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 / File I/O with or without DarkGDK

Author
Message
IsGreen
16
Years of Service
User Offline
Joined: 4th Oct 2008
Location:
Posted: 1st Nov 2008 14:11 Edited at: 1st Nov 2008 17:38
The goal is to create a map from an image, and create the scenario from the file later.

Thanks to help from some of you I have been progressing, but I can not continue with my project.

This is the 'code One'.



This is the 'code Two'.


Both codes do the same thing. If viewing the file from a notepad, everything is OK. But when viewing the variable bBit_Map, all values are 1.

I think it is because Part 2 of code, only loads the first line of the file, which is 1111111111111111111111111111111...(All 1)

I try, collecting all the strings before saving the file, in that other 'code three', but don't work.


Finally, I searched tutorials on <fstream>, but it is still not operating near the DarkGDK. 'Code Four'.



Is there a solution? I hope it will be yes.

Greetings. (translate by Google Translator)
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 4th Nov 2008 11:26
As you state, the problem is in the load. I cannot see anything strictly wrong. Perhaps you should insert some breakpoints to see why the read doesn't work.
Also you might want to try strcmp to compare strings or use the numeric ascii value for '0'

Login to post a reply

Server time is: 2024-11-25 05:29:15
Your offset time is: 2024-11-25 05:29:15