The Partridge Family were neither partridges nor a family. Discuss.
-
robp
- Posts: 1
- Joined: July 5th, 2013, 11:54 pm
Post
by robp » July 5th, 2013, 11:58 pm
Everything was working fine for me until about 2hrs 30 min into the lesson when I ran I would get this error:
Unhandled exception at 0x0f6d37ff (msvcr100d.dll) in ScoreBoard Test Bench.exe: 0xC0000005: Access violation reading location 0xcccccccc.
When I set a break point and stepped through it turned out it was running everything fine until it got to this part in the Serialize function:
FILE* pFile = fopen( fileName,"w" );
Any thoughts on what the issue is? I've rewound a few times and paused to look at the code and it looks identical in every way so I can't figure out what's going wrong.
PS- I tried this without the txt file I called being there and with it being there and having no data and got the same error.
More specifically the error is occuring at this part of fopen.c:
Code: Select all
if(*file==_T('\0'))
{
errno=EINVAL;
return NULL;
}
-
LuisR14
- Posts: 1248
- Joined: May 23rd, 2013, 3:52 pm
- Location: USA
-
Contact:
Post
by LuisR14 » July 6th, 2013, 8:48 am
that exception would indicate that filename is set to a null pointer
, most prolly you didn't pass a filename to the constructor of scoreboard
(since filename is null it can't deref it in the line if(*file==_T('\0')) )
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]
irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]
alt[/url] -- join up if ever want real-time help or to just
chat --