Converting a string to char array gets me ascii numbers
Forum on trading, automated trading systems and testing trading strategies
Converting a string to char array gets me ascii numbers
Matheus Hernandes, 2023.01.31 03:24
char charArray[3]; charArray[0] = 'a'; charArray[1] = 'b'; charArray[2] = 'c';
I'm trying to convert a string into a char[], in order to write a file using WriteFile from kernel32.dll.
Happens that, this gives me an array o ASCII numbers line in the attached screen shot.
This doesn't happen if I explicitly define values for each char array position, like:
What exactly I'm doing wrong? How I manage to get a proper array of characters from a string?