i didnt have any problems with my file untill i started getting help from you, all i wanted to do is to make it check to see if the file exists or not and you all throw these long responses back at...
Type: Posts; User: jobolikescake
i didnt have any problems with my file untill i started getting help from you, all i wanted to do is to make it check to see if the file exists or not and you all throw these long responses back at...
hmm...imperito if you had even bother to check back on my last post you would have realize that i said that method didnt work either
ive had no problems with those global variables till you...
if you dont want to give me an example, fine you dont have to. ill just ask some where else.
alright i appreciate all the help, but i plain hate smart remarks. what is the purpose of a forum if all you get is links to here and there instead of actual help. sometimes it makes alot more sense...
its going to be loading numbers and could i get an example of how to use it, i looked it up on that website from another post and ive searched this site but i dont understand how to use it.
int fileIn( char *f ) {
FILE *fd;
if( ( fd = fopen( f, "r" ) ) ) {
/* file exists */
fclose( fd );
return 1;
} else {
/* file doesn't exist */
return 0;
}
ok, ive been researching on this subject all day and ive finally narrowed it down to 2 errors which are..
when i first used ifstream fileIn(/*file here*/)
i used fileIn >> array[i] during a loop...
i just cant figure it out. i changed the stuff you said to change to fix it but i just cant get it right for some reason.
the problem seems to be the changing the int filein to the ifstream...
first of all, how can you tell me that anything i do or do not do is deliberate.
i didnt type it up i just coppied and pasted into my compiler and compiled it and i didnt realize there were no...
the program is most likely not going to get any bigger so how would i do what you mentioned here.
i dont understand
i tried using vvv's but i couldnt get it to work, now im using yours but every file in try it tells me that it doesnt exist
now it tells me that every file that i enter doesnt exist
how do i get my program to check if the file is actually there or not
i.e
fileIn("text.txt")
but text.txt doesnt exist
thanks for any help
i think i got it now, thanks for the help
for the first question though i want to break it down into 1 number each so that i can apply some simple encryption to them
First Question.
how would i load a file with numbers such as
20
35
10
50
and break them down into 2 arrays
i tried the program out again and the only time it crashes is if you dont have any characters created so ill go and put in something so that it doesnt load non-existing files.
**** what could be wrong with it, cause it runs perfectly on my computer.
actually no it wasnt, i didnt realize it untill i started checking out some of the errors.
ooopss didnt notice it at first but there is no .h's on any of the includes
now i only get one error
fatal error; cannot open include file cstdlib.h
alright i got a lot of different problems than what you got ride or die...
--------------------Configuration: test5 - Win32 Debug--------------------
Compiling...
test5.cpp
c:\documents and...
alright i believe i fixed the dividing by 0, i made it so you cant load the same character in both places and crash the game, and i added a touch of info to the beginning of the battle option to help...
how would i do that?
alright ill check into it
and also did any of you leave any of the stats at 0?