Results 1 to 5 of 5
Ok I am pretty new to linux, but have done java and c++ programming in a unix-like enviroment before via ssh. I am trying to run a simple c++ that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-14-2005 #1Just Joined!
- Join Date
- May 2005
- Location
- Tucson, AZ, USA
- Posts
- 3
need help running compiled c++ code
Ok I am pretty new to linux, but have done java and c++ programming in a unix-like enviroment before via ssh. I am trying to run a simple c++ that I have compiled in the following way.
when I do this it makes a file in the current directory called:Code:c++ -o hello hello.cpp
hello*
now usually to run the program I would just type hello in the shell and it would run the program right? but when i do type hello I get this:
Thank you for any help and your patience helping out a linux-newbie,bash: hello: command not found
Jeremy
- 05-14-2005 #2Linux Newbie
- Join Date
- Aug 2004
- Posts
- 220
are you typeing:
hello
or
./hello
?
./ means "in this directory"
- 05-14-2005 #3
Like robotics56a said, you will have to type:
You will have to be in the directory of the compiled program for that to work.Code:./<program name>
BryanLooking for a distro? Look here.
"There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
Queen's University - Arts and Science 2008 (Sociology)
Registered Linux User #386147.
- 05-14-2005 #4Just Joined!
- Join Date
- May 2005
- Location
- Tucson, AZ, USA
- Posts
- 3
doooow
Thanks guys for the quick response!!!
- 05-21-2005 #5
No problem, glad to help.
BryanLooking for a distro? Look here.
"There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
Queen's University - Arts and Science 2008 (Sociology)
Registered Linux User #386147.


Reply With Quote
