RE: [newbie] g++ compiler error

2000-11-23 Thread Dennis M Pettersson

Try
./a.out
or
sh a.out

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Wilbert Ho
 Sent: Wednesday, November 22, 2000 10:47 PM
 To: [EMAIL PROTECTED]
 Subject: [newbie] g++ compiler error


 Hello. I wrote an elementary C++ program with vi and called it temp.cpp
 After compiling with g++ temp.cpp I'm presented with the executable a.out
 (which is as it should be). My problem is, when I try running
 a.out all I'm
 getting is

 bash: Command not found

 Any ideas?







Re: [newbie] g++ compiler error

2000-11-23 Thread Paul

On Wed, 22 Nov 2000, Wilbert Ho wrote:

Hello. I wrote an elementary C++ program with vi and called it temp.cpp
After compiling with g++ temp.cpp I'm presented with the executable a.out
(which is as it should be). My problem is, when I try running a.out all I'm
getting is

bash: Command not found

Any ideas?

First check if a.out is executable:

ls -l a.out
It should show a bunch of x's in the permissions. Not there, then do

chmod +x a.out

And when you want to run it, from the dir where it is:

./a.out

Paul

-- 
Not: live and let live
But: live and help to live

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
 Linux Mandrake 7.2 - Pine 4.30