View Single Post
Old 07-20-2005, 01:05 PM   #1 (permalink)
Aniviel833
Registered User
 
Join Date: Jun 2005
Posts: 26
Aniviel833 is on a distinguished road
Initializing char array

I recently changed a string variable in my class to a character array. Before I did this, I was able to initialize it in my default constructor like so:

Code:
MyClass::MyClass() : 
myString(0)
{}
but now I get an error: incompatible types in assignment 'int' to 'char[2]'.

How would I fix this?

Thanks!
Aniviel833 is offline   Reply With Quote