I'm trying to make an old C console program work in Visual C++. It's a program that uses file processing to a binary file.
I use this struct:
When I use the gets() function in my console program I can take whatever the user input to a char buffer. With this I can save any type of character in my database.
But in VC++ 6, I'm using an edit box with CString. If I take the contents of the edit box and use strcpy() to copy the CString to the
char array in a Sample struct things go wrong. The program doesn't complain but something goes wrong in adding this struct to the data file. When added the word can't be found.
It's alright as long as I don't use digits and odd characters.
How can I get the text in the editbox without any changes to a char array? If the user inputs Name as: bill12_e()/&%_- then I would like that exact name to be in the data file.