Re: [of topic] programming problems...

From: Serge Skorokhodov (usia@operamail.com)
Date: Wed Jan 16 2002 - 22:16:36 CET


Hi everybody,

VPP> void main (void)
VPP> {
VPP> char variable[25];
VPP> variable="string";
VPP> }

VPP> I have used all my little knowledge of programming on this
VPP> one, but the problem remains and my hair is getting shorter
VPP> :(

If you look into error messages you see something like:

"cannot assign to constant" or "l-value required on the left side
of assignment".

The type of variable in your example is char * const and it
cannot occur on left side of assignment (you cannot change it
legally. Try this:)

(char *)variable = "string";

The result is undetermined though:)

--
Serge Skorokhodov usia@operamail.com
17.01.2002 0:11 (Moscow time)
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:21 CET