Sometimes when I use a lab PC for visual C++, even when a program is very simple and absolutely correct, and sometimes passes the compiler, but when i try to run it, it shows "Fatal error... can't find path...." what's the reason?

Recommended Answers

All 6 Replies

>>even when a program is very simple and absolutely correct

>>t shows "Fatal error... can't find path...."

Two completly contridctory statements.

>>what's the reason?
Your program has one or more bugs. Post code because I have a hard time seeing your monitor from my home :)

Also what Operating system ? If *nix make sure the executable file is in a directory in your PATH environment variable or use "./program " to execute it to indicate to the shell that its in the current directory.

Ancient Dragon :) I'm not in the lab now but I can tell you it's a simple program which runs perfectly well on other computers in the same lab, but has "fatal error" on several computers. I'm just puzzled why it's so. They are all win XP. (sorry at this moment I don't remember the exact words of the error, but it's "fatal error" involving the path. I checked the program name, directory, and nothing wrong with it.

are u compiling the program from an external storage device like a flash drive??

No, all the computers in that lab have visual C++ installed.

Compile in debug mode and run in debug mode, you will find out exact file and line number which is causing the problem.

Please post the error message exactly as it is displayed. The computer probably lacks one or more .dlls that your program needs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.