hi, im trying to make a structure made up of character strings. it looks like this:
however, when i try to give the strings a value:
i get an error:
'=' ; left operand must be 1-value
anyone, please help me. i think the problem is the way i define the character strings. thanks.
give them a value like this,
include this file string.h
where 49 is the max number of characters to copy
No-one is right. And the reason why you got that error is that
team1.pitcher is a char and "Babe Ruth" is a string. You can't assign a string to a char.
hmmm...catcher[xyz] is an array. an arrays are a kind of direct pointers. catcher==&catcher==&(&catcher). Array can only initialized on definiton: 'catcher="343"',, their address is set up on compilation and it cannot change on runtime! So "catcher=3433" is illegal! LValue required.
it worked! thanks a lot! :D :cool: