-5

I have the following code that presents no errors when compiled. I have tried numerous suggestions from answers on other questions and my issue persists: when I compile by typing "g++ hello world.cpp -o helloworld" I have no errors compiling but nothing displays to the console. I am a complete beginner. What is the issue here?

#include <iostream>

int main()
{
    std::cout << "Hello World." << std::endl;
    return 0;
}
anon1001
  • 107
  • 6

1 Answers1

4

g++ hello world.cpp -o helloworld" compiles the code, it does not execute it.

Execute it with : ./helloworld

(make sure that you have the permissions to do so)

quantdev
  • 23,517
  • 5
  • 55
  • 88