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.

2D All the way! / 2d platform game level loader

Author
Message
logicandchaos
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 23rd Sep 2009 02:37
hi, i used to use turbo c 3.0 over 10 years ago to make games when i was a kid, and i just got VC++ & dark gdk, and i'm trying to figure out how to load level data from a txt file into a 2d array for a tile based platform game, i'll probally use a char array 50*50 (char mapArray[50][50] but i don't know much about file IO in VC++ & dark gdk and been having a lot of trouble trying to find tutorials on this, thanx.

logicandchaos
logicandchaos
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 23rd Sep 2009 21:10
i found some good info for this already on another post but now everytime i try to include iostream or fstream i get errors

logicandchaos
feiting shadow
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 24th Sep 2009 21:37
Try either:


and perhaps add using namespace std; below that line (the includes).

Report the errors otherwise

Signed
------
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 24th Sep 2009 23:50
Input/Output with files is a great tutorial.

I think it's pretty much impossible to have VC++ without iostream and fstream since they usually come both in the same package... They're typed without extensions (no .h) just plain


I also believe this is more suited in the Dark GDK board.

Sven B

Login to post a reply

Server time is: 2024-03-28 21:57:26
Your offset time is: 2024-03-28 21:57:26