This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with the string


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!";

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]