LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with g++ (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-g-126861/)

J0nathan 12-18-2003 03:09 AM

problem with g++
 
I've been trying to get g++ to work - i type:
g++ guess_number.cpp
where guess_number.cpp is the name of my source file. This works correctly, and a file called a.out is created. The probem is, i cannot run a.out. I tried typing a.out in the konsole, but it just said:
-bash: a.out: command not found
I even tried double clicking on the file, but nothing happens. How do i run it??
:newbie:

MartinN 12-18-2003 03:14 AM

You need to type
./a.out

The current directory is not part of the path that is searched for commands to run.

Regards
Martin

J0nathan 12-18-2003 03:23 AM

Oh, thanks a lot! :)
Wonder why my book doesn't say that? :confused:


All times are GMT -5. The time now is 11:25 PM.