Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 30 Nov 2009
Offline Last Active Feb 04 2013 11:16 AM

Posts I've Made

In Topic: I/O File new line problem

11 January 2013 - 10:08 AM

Did you try opening your files in binary mode instead of text mode?

It works. I opened a file in binary mode:

std::ofstream os("test.txt", std::ios::binary);
os << "\n";

and except for "\r\n" it wrote "\n" on Windows. This means I have to read and write in binary mode and the ciphered file can be read on any OS. Now I don't have to worry about this problem anymore. I forgot that std::ios::in/out opens files in text mode.


PS: My program is in it's final stage. You enter an integer key and the algorithm ciphers it. Only the correct key can decipher it. The only question is what shall happen if you need too many tries for entering the correct key.

In Topic: starting 2 extern programs at the same time

25 February 2012 - 01:13 PM

thx a lot. If you would also know how to do it on Ubuntu, would you send me an example/link as well?

In Topic: Include header from previous folder

02 January 2012 - 08:52 AM

I tryed to say "Characters/......h", but it didn't work. I only get a list of header-files in the project within that folder.

Edit: Now it worked, I wrote the wrong include direction xP

In Topic: Include header from previous folder

02 January 2012 - 08:19 AM

To reiterate SimonForsman's warning, it's not a great idea to use relative paths when doing header inclusion. IMO, the other suggestion is the one to pick given the choice, as it is more robust to project reorganization.

My project will have around 100-200 classes, maybe even more. How else should I organize the project?

In Topic: Include header from previous folder

02 January 2012 - 06:45 AM

(To include from the parent folder you can use #include "../whatever.h" on some platforms, but in general it isn't a great idea)

thanks, this helps. I forgot the command for parent folders.
I'm using VC Studio 2010 as IDE (maybe I'll test the game on Ubuntu as well). Wish me luck for my first game.

lg rumpfi88