Similar Posts

Subscribe
Notify of
6 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
R4c1ngCube
1 year ago

VSC tells you:

“Expected a ‘;’ “

Translated for you:

“You forgot a semicolon at the end of the line”

regex9
1 year ago
Reply to  Dennion4

The signature of main is not right either. The return type should int be.

Complete example:

int main() {
  printf("Hello world!");
  return 0;
}

With the returned value, you will participate in the program that will call your application later, whether the execution was successful (0) or not (1).

For C++ implementation files, the .cpp extension is common and for a console output, the cout-Stream iostream) da:

#include 

int main() {
  std::cout << "Hello world!";
  return 0;
}
R4c1ngCube
1 year ago
Reply to  Dennion4

Did this fix the other error? (I only saw it now)

Suiram1
1 year ago

Note: A C++ source code file should have the ending .cpp and not .c++. Since this is a C program you should have the ending .c.

lg Suiram1