Hi im kinda new to c++ and I can't seem to fix this compile error.
insertI am trying to make a function that takes a String and converts it into a c-style string.Code:char String::c_str() { char* cs; cs = new char[length+1]; strcpy(cs,first); return cs; }
I keep getting this error though " invalid conversion from 'char*' to 'char'"
How come this happens and how can it be fixed.
Thank you all who attempt to help.



LinkBack URL
About LinkBacks


