I'm currently working with MFC to build a certain program, which requires the user to enter a series of numbers as highlighted down below in a CString ( let's call it aCString for simplicity).
I can convert a string or array of chars to an array of floats using 'strtok' without problems .
But I'm struggling to convert CString to a string or array of chars so I can do the pre-mentioned conversion !
-I tried strcpy
strcpy(my_string, (LPCTSTR)aCString);
But got that error
char *strcpy(char *,const char *)': cannot convert argument 2 from 'LPCTSTR' to 'const char *'
I appreciate the help !

strtok()(although not destructive) is CString::Tokenize().CStringisn't using normalcharas characters, butTCHARwhich will be defined ascharorwchar_tdepending on theUNICODEmacro in your project settings.