compile. continue coding. get error from code thats unchanged

i've been continuing to code my file system class today and earlier i added the function FindFirstFile() to my constructor to give it a fndfile handler. when i tired to compile it said it couldn't convert string1 to type const char *. so i made string1 a const char* and then it said it couldn't convert it to a string! i fiddled around a bit and eventually all the errors dissapeared ( i even manged to replace the string by a function that returns a string. whoopee!). problem is i can't remember what i did (some crummy little detail probably)

all's well untill i tried to actually code the fileExist function. coded it, tried to compile and i got the same error from the constructor again! i tried reverting my code back to what it was and i still get the same error. there are two reasons

1) theres one little tiny piece of code that is breaking the whole thing

2) theres somthing in my IDE/compiler (dev c++/mingw) that i havent undestood which is making it not compile right

And it's also considered bad practise to put any sourcecode in header files. You should just have declarations there.

Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

i tried coding in my fileExists function, and it compiled fine. then when i made a call to it from main, and compiled again, it stopped working. now ive put .c_str() at the end of and it's working again. oh well, at least it works (even though it worked better before...)

edit for Xsquared: sorry, didn't see your post. so i have to declare what in the header file? just the class and variables+prototypes in the header and then all functions in a .cpp file?