every new programmer wants to type the hello world program when he is learning a new programming language. today we will learn how to write a simple hello world program in c++ without any compiler error.

hello world program in c++

first, create a folder and open the editor window and create the file and give the project name. and you should try writing code by yourself.

hello world program is some line code. you follow this step.

Example of Hello world program in c++

#include <iostream>
using namespace std;

int main() {
    cout << "Hello World!";
    return 0;
}

output

Hello World!

after writing this source code display will be output hello world. and if you use turbo c++ so the compiler will display the error message.

when you use turbo c++ so write #include and not write using namespace std.