FrankyTheFish
Programmer
What I'm trying to do is to create a class that will ultimatly be used to have file from which the game will get all the eidtalbe variables, such as much, sounds effects and game parameters.
Now I haven't used ifstream in a very long time, I've tryed a few ways and can't seem to get it to work.
There would be 1 parameter per line. If anyone can explain to me how getting information from a file works I'd appreciate it greatly.
Thanks for taking the time to read and reply.
Frank
=-=-==--=
ifstream inFile;
ofstream outFile;
char inputFilename[] = "CTF.txt";
char attackString[] = "phaser.wav"; //default values if there's no file
char musicString[] = "music.ogg"; //default
inFile.open(inputFilename, ios::in);
outFile.open(inputFilename, ios:
ut);
//char stringRead[50];
attackString = getline(inFile,256,'\n');
getline(inFile, musicString);
=-==-=-==
Now I haven't used ifstream in a very long time, I've tryed a few ways and can't seem to get it to work.
There would be 1 parameter per line. If anyone can explain to me how getting information from a file works I'd appreciate it greatly.
Thanks for taking the time to read and reply.
Frank
=-=-==--=
ifstream inFile;
ofstream outFile;
char inputFilename[] = "CTF.txt";
char attackString[] = "phaser.wav"; //default values if there's no file
char musicString[] = "music.ogg"; //default
inFile.open(inputFilename, ios::in);
outFile.open(inputFilename, ios:
//char stringRead[50];
attackString = getline(inFile,256,'\n');
getline(inFile, musicString);
=-==-=-==