LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2005, 02:07 AM   #1
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Rep: Reputation: 31
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

 
Old 05-26-2005, 02:15 AM   #2
nitroid
Member
 
Registered: Jul 2004
Location: Finland
Distribution: Arch and Maemo (N900)
Posts: 32

Rep: Reputation: 15
If the file is executable, just type 'sarajevo' (without the ' ' of course). If it's not, type './sarajevo'.
 
Old 05-26-2005, 02:23 AM   #3
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228

Original Poster
Blog Entries: 1

Rep: Reputation: 31
thank you

Thank you

Your advices are very helpful for me


 
Old 05-29-2005, 07:53 PM   #4
eddiebaby1023
Member
 
Registered: May 2005
Posts: 378

Rep: Reputation: 33
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".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration