Jump to content
  • Advertisement
Sign in to follow this  
VB_master

Unknown bug - C++ debugging problem

This topic is 3965 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, I'm having troubles with my C++ console application. At some point the application simply crashes and I can't find the reason for such thing. I am using Dev-C++ 4.9.9.2 and I can't find a way to debug it properly. The only thing I found out while debugging was this window showing up when the application is about to crash. It doesn't crash every time I run it. Here is the screenshot: Bug Screenshot Please help. Thanks in advance! VB_master.

Share this post


Link to post
Share on other sites
Advertisement
This doesn't really answer your question unfortunately, but why not use VC2008? DevCpp hasn't been updated in years, and if you get an access violation in VC2008, you get taken to the exact line that caused the problem, and a nice call stack showing you what calls were made up to that, right back to before WinMain / main.

Share this post


Link to post
Share on other sites
I don't have VC2008 but I tried the code in VC2005. The application doesn't crash at all but I've got another problem. I get the error "error C3861: 'time': identifier not found" on the line

srand(time(NULL));

Why's that so?

Share this post


Link to post
Share on other sites
Quote:
Original post by VB_master
I don't have VC2008 but I tried the code in VC2005. The application doesn't crash at all but I've got another problem. I get the error "error C3861: 'time': identifier not found" on the line

srand(time(NULL));

Why's that so?
From the documentation:

Routine Required header
time <time.h>

Did you include time.h? And did you use angled brackets rather than double quotes?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!