error C2106: '=' : left operand must be l-value

Hi guys, Can anybody help me in this kind of error?..I'm actually reading a file text and I'm trying to save the string in some variable but I cannot save it because of this error,what is the solution for this..Her is my code:

infile.getline(STRING,10,':'); // Saves the line in STRING.
tmpST.id=STRING;//(where the error occurs)
cout<<STRING<<endl; // Prints our STRING.
What is tmpST and what is the type of id?
tmpST.id can accept characters
this actually from stdudent database and tmpST there is a temporary type of Student data,the id number of students is in the form of a string
coz im actually doing a file reading and writing and also saving the inputs..
Topic archived. No new replies allowed.