Problem with the string

kanishk rastogi kanishk.85@gmail.com
Fri Nov 24 10:15:00 GMT 2006


On 11/24/06, Andrew Haley <aph@redhat.com> wrote:
> 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!";
what abt the strings passed to functions?
i dont want to have them in readonly menory

thanks

>
> Andrew.
>
>

-- 
Everybody is made for some purpose. Find yours.



More information about the Gcc-help mailing list