-1
I installed Sublime Text on my linux. I opened the test.cpp file that contains the following code:
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
system("pause");
return 0;
}
But when I run the code only appears: [Finished in 0.9s]
Hello world does not appear, and when I put some reading command neither. I thought he wasn’t running my code, but he only has it open in the sublime, I can’t check.
So, I replace what Voce said, but even so gives no same. I left only Cout and also continues
– user80871
But you need to let the
cin.get();
to wait for you to type something before closing.– anonimo
I formulated wrong. I meant I replace what you asked for :
std::cout << "Press enter to continue ...";
std::cin.get();
and I also tried to leave alonecout << "Hello World!" << endl;
and yet it continues. I think it’s the compiler, but I downloaded the right gcc.– user80871