Hey, me again.
The MSDN library is crap, give me an example damnit...I don''t know how it justifies it''s 4gig installation or whatever it is...
This is part of my code:
...
if ( GetSaveFileName( &openFile ) == TRUE )
{
Game->saveLevel(openFile.lpstrFile);
}
which, hopefully passes the name of the file to my saveLevel function in game:
void cGameWorld::saveLevel(char* levNam)
{
fstream File;
File.open(levNam, ios::out | ios::binary);
...
Except it doesn''t. I ran it through the debugger and I''m getting access violations, and openFile.lpstrFile is actually NULL.
So where is the filename the user types in actually stored? And if it is in lpstrFile, what kind of format?