By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

Error with System("pause"); - Please Help

P: 5

I can not get the system pause to work in a simple program. Here is my program below:

// i/o example

#include <iostream>
using namespace std;

int main ()
int i;
cout << "Please enter an integer value: ";
cin >> i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;

I get an implicit declaration of function 'int system(...)' error when I try to enter the pause code. I can not seem to get it to pause to program to see the results!! Please help
Jul 25 '07 #1
Share this Question
Share on Google+
5 Replies

P: 86
Are you on a windows machine? "pause" is a windows console command
Jul 25 '07 #2

P: 5
I just got some help from a friend. I needed #include <string> to be able to use the code

Problem Solved!!!
Jul 25 '07 #3

P: 41
you could just run your program from the console, then you would not need to pause it
Jul 25 '07 #4

P: 5
I was using Bloodshed C++ program on my Windows XP System. I am just learning to program in C++
Jul 25 '07 #5

P: 5
Solution Found! Thanks For Help Again!!! I needed the header #include <string>
Jul 25 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.