Cant see my output!!

My program runs without error. It has few cout statements. But I cant see any output on console. I tried using cin.ignore, but that does not seem to have any effect. I press run, and program runs, without showing any output screen. When I use system("Pause"), my console shows only one line i.e press any key to continue. How can I see my output???
What is your code?
#include <iostream>
#include <vector>
#include <string>
#include <limits>
using namespace std;
main()
{
vector<string> SS;
SS.push_back("The number is 10");
SS.push_back("The number is 20");
SS.push_back("The number is 30");
cout << "Loop by index:" << endl;
int ii;
for(ii=0; ii < SS.size(); ii++)
{
cout << SS[ii] << endl;
}
cout << endl << "Constant Iterator:" << endl;
vector<string>::const_iterator cii;
for(cii=SS.begin(); cii!=SS.end(); cii++)
{
cout << *cii << endl;
}
cout << endl << "Reverse Iterator:" << endl;
vector<string>::reverse_iterator rii;
for(rii=SS.rbegin(); rii!=SS.rend(); ++rii)
{
cout << *rii << endl;
}
cout << endl << "Sample Output:" << endl;
cout << SS.size() << endl;
cout << SS[2] << endl;
swap(SS[0], SS[2]);
cout << SS[2] << endl;
cout << "Press ENTER to continue...";
cin.ignore(numeric_limits<std::streamsize>::max(), '\n' );
system ("PAUSE");

}
Aside from main() that it should be declared as int, your program runs (and outputs) right on my computer.
Your is likely to be a setting error, try to see if your project is a console application
Topic archived. No new replies allowed.