I dont understand some problems I'm having concerning the CString, string, and char * variable types!!
For some reason my computer or complier doesnt like these variables... I am using VC++ 6.0.
I am trying to find the best way to have a variable that can hold a string but can be written to with a variable of type char, like this: str[i] += ch; or str[i] = str[i] + ch;
When I try to use a CString in this way it says Error '=': lefthand operand must be l-value. ?????
I cant use char * because when i do that my program gives no errors and runs but then crashes when ever it gets to a line with that variable in it.
and with my string variables i am getting this problem:
using string with a cout or cin gives me an error: operator '<<' doesnt take a lefthand variable of class
string...
Does anyone know how to fix any of this????????? Plz Help. Thanx.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()




Reply With Quote