LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Does anybody know (https://www.linuxquestions.org/questions/programming-9/does-anybody-know-327195/)

sarajevo 05-26-2005 02:07 AM

Does anybody know
 
Hi

I wrote last night an code in c++
I used vi editor to write code and I named it sarajevo.cpp

I saved it in direcroty Bosnia
and in directory Bosnia I run command g++ sarajevo.cpp -o sarajevo

and i got new file sarajevo in direcotry Bosnia
so now I would like to run my program sarajevo

What I should type in my shell to run it....


Thank you

:study: :newbie:

nitroid 05-26-2005 02:15 AM

If the file is executable, just type 'sarajevo' (without the ' ' of course). If it's not, type './sarajevo'.

sarajevo 05-26-2005 02:23 AM

thank you
 
Thank you

Your advices are very helpful for me


:newbie: :study:

eddiebaby1023 05-29-2005 07:53 PM

Quote:

Originally posted by nitroid
If the file is executable, just type 'sarajevo' (without the ' ' of course). If it's not, type './sarajevo'.
If you have your PATH set to include the current directory (.) then typing "sarajevo" will work. If you haven't, you'll need to type "./sarajevo". In either case the file must be executable. If it isn't, type "sh sarajevo".


All times are GMT -5. The time now is 08:10 AM.