Problem with the string

Andrew Haley
Fri Nov 24 09:56:00 GMT 2006

kanishk rastogi writes:
 > hi all,
 > when we compile our c programs the strings which we use get defined in
 > read only memory.
 > how can i ask the gcc compiler to declare them in read-write section.

You just gotta declare them right.  Like this:

char s[] = "This is a string!";


More information about the Gcc-help mailing list