LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-01-2011, 09:17 PM   #1
fsshl
Member
 
Registered: Jan 2002
Distribution: Ubuntu10.04
Posts: 49

Rep: Reputation: 1
system("pause");


Dear c++/g++ programers:
when I use system("pause") at the end of my c++ program, after I run it,
-----
root@eric-laptop:/home/eric/cppcookbook/ch11# ./a.out
rho = 3, theta = 1.5708
rho = 5, theta = 0.643501
sh: pause: not found
root@eric-laptop:/home/eric/cppcookbook/ch11# pause
pause: command not found
---------------------------------------------------------
I don't know which bash shell I use, I use ubuntu10.04 based linux
is my program right?
(sh: pause: not found) seem a little bit out of expectation
thanks any expert's reply and help in advance, Eric
 
Old 08-01-2011, 09:39 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
'pause' is a windows command and not a linux / shell command (hence the error). Also it is not a case of
which bash shell you are using as bash is a shell. So the question is which shell are you using and in ubuntu it is most likely to be dash.

Hope that helps.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl word Unscrambler seems to "pause" in middle. vjx242 Programming 1 07-11-2011 08:29 PM
"bad_pool_error" & "Your system is not fully acpi compliant get your Bios updated" errors in WinXP Aquarius_Girl General 10 07-30-2010 11:27 AM
"fc5" mount does not recognize "smbfs" file system? bdplays Linux - Networking 6 06-28-2006 11:21 AM
Mplayer-function "pause" provokes CRASH pablovschby Linux - Software 5 12-16-2004 02:00 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM

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

All times are GMT -5. The time now is 11:28 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