Why does this code not work?
sscanf(text, "%i\t%s", a, b);
What happens is an Access violation error.
'file' is a CStdioFile that has been opened correctly.
text is reading correctly (contains that text "1 fred").
If I change 'a' to be a CString and modify the sscanf appropriately, 'a' and 'b' both become the last string that was scanned.
This program is being written using MS VC++ ver4.2 under Win NT 4.0.
How do I get around this, such that both objects are read correctly?