what does this compiler error (Borland) mean:
Lvalue required in function main()
Printable View
what does this compiler error (Borland) mean:
Lvalue required in function main()
well, without seeing the code, I cannot understand too much.
heres an example code that causes this error:
<code>
string strng[5];
char arry[5];
strng[2] = "Howdy";
arry = strng[2];
cout << arry;
</code>
this is the problem line:
but whats the problem?Code:arry = strng[2];
You need to put a number by arry, eg:
Code:arry[2]=strng[2];
Or if strng is an array of strings,
Code:strcpy( array, strng[2] );
how's that supposed to work?Quote:
Or if strng is an array of strings,
Code:strcpy( array, strng[2] );
i tried it and it said
"could not find a match for 'strcpy(char *, string)'"
Code:strcpy( array, strng[2].c_str( ) );
wow that worked! thanks..
but what does the last bit mean?