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.

AppGameKit Classic Chat / Writing to a file readable by C++

Author
Message
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 10th Aug 2019 15:00
Hi all,

I have an odd query. I have a tier 1 AppGameKit program that writes a series of integers to a text file using writeinteger. It's easy to read these back in with another program using readinteger. My problem is that I need to read them into a C++ program. I've been trying to use ifstream to read files created by my AppGameKit program, but it's not reading anything. I've tried changing it so that the integers are written with writeline, and then read by C++ with getline(). This doesn't work either - it's just returning blanks.

How can I write integers into a file in tier 1 AppGameKit that can be read by a C++ app? Is this possible at all?

Thanks for any ideas...
Undiscovered Worlds: a procedural landscape generator
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 10th Aug 2019 20:46
Well, crisis averted, hopefully. Turns out that you can write them in AppGameKit using writeline, and then read them as strings in C++ with getline, and then convert them into integers with stoi().
Undiscovered Worlds: a procedural landscape generator

Login to post a reply

Server time is: 2024-04-27 01:24:00
Your offset time is: 2024-04-27 01:24:00