|Show us your code and we might be able to answer rather than just guessing. But I'm feeling psychic tonight, so I'll guess you are doing something like|
error = system("dir");
Hmm - that's not going to work is it? "dir" is a built-in command in cmd.exe, not an executable file. Try:
error = system("cmd /c dir");
Of course I could be completely wrong.
Edit: Actually, in retrospect, I may indeed be worng. It's a long time since I used Turbo C as I prefer to use compilers that are younger than myself - and I'm no spring chicken. It could just be that you are trying to run the program from within the IDE. This is a known feature and it means you have run out of memory. Try running the standalone .exe file rather than running in the IDE. Better still, implement your own "dir" function rather than using the DOS one. That will be more efficient and will be educational.