I'm porting a largeish program from MSVCPP6 into GCC3.2.3 My program has the following function:
Code:
void myClass::load(const char filename[]) {
ifstream file(filename);
if (/*conditions*/) load("anotherfilename")
file.close()
}
i.e. a load function which, under certain circumstances, calls itself recursively to access another file before carrying on. This works fine under VCPP+WinXP, but under GCC+Linux it fails with the second (and subsequent) file openings.
Is this an operating system difference? How do I resolve this problem?
Thanks