Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / fstream.h error on VC++ 2008 for my Dark GDK project

Author
Message
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 24th Dec 2009 20:05
I was trying to run a pathfinding example that I found http://www.policyalmanac.org/games/aStarTutorial.htm the famous A* algorithm but when I run the sample code they provide in that website it gives me a ""fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory"".

I have looked over the internet when realized that apparently the problem is a matter of visual studio versions. But I cannot find an answer to this problem, I just want to run this sample and need to know what changes need to be done in order to make it work.

Thanks in advance. Any help will be appreciate it.
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 24th Dec 2009 21:10 Edited at: 24th Dec 2009 21:11
This may sound a little stupid, but try getting rid of that ".h" in "#include <fstream.h>".

If that doesn't work, you might need to re-install MSVC9

http://www.darkgdk.us/ <- You can now submit pages, upload images, yet were lacking content. We need your help!
Freedom Fighters
15
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 24th Dec 2009 23:05
fstream is a library i think. you dont use header. just use #include <fstream>

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 24th Dec 2009 23:34
Cuddle Bunniezzz 12 & Freedom Fighters I try both of the things but they did not work. keeps giving me the same error
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 25th Dec 2009 07:03 Edited at: 25th Dec 2009 07:03
Hmm.. Check the MSVC9 include files.

Head here:
C:\Program Files\Microsoft Visual Studio 9.0\VC\include

Look for a file called "fstream" (no ".h" extension), it it's not there, download the attached file, and place it there (and call it "fstream" (with no ".h").

If that doesn't work, you might have to re-install MSVC9.

http://www.darkgdk.us/ <- You can now submit pages, upload images, yet were lacking content. We need your help!

Attachments

Login to view attachments
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 25th Dec 2009 23:02
I already added to the include files after your advice and put it without .t in the code, but it is still asking me for fstream.h not fstream.

Visual c++ works perfectly, this is the first time I found this issue and I am sure is not a bad installation problem.
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 26th Dec 2009 02:27
It might just be a problem with MSVC9, just try to re-install it.

http://www.darkgdk.us/ <- You can now submit pages, upload images, yet were lacking content. We need your help!

Login to post a reply

Server time is: 2024-11-20 07:15:08
Your offset time is: 2024-11-20 07:15:08