-1
#include <bits/stdc++.h>
using namespace std;

int32_t main()
{
    cout << "Hello\n";
}

This is my code and the code is running, but Visual Studio Code shows this squiggles line with the message

expected initializer before 'std' gcc

which makes me conscious about my code.

Drew Dormann
  • 50,103
  • 11
  • 109
  • 162
fatimaa
  • 1
  • 1
  • 3
    `#include ` you should never use this line: [https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h) – drescherjm Mar 04 '21 at 19:59
  • 1
    `int32_t main() {` should be just `int main() {` – drescherjm Mar 04 '21 at 20:00
  • 2
    [Pro Tip] `main` **always** returns `int`. **always**. – NathanOliver Mar 04 '21 at 20:01
  • Since [your code runs](https://godbolt.org/z/Mf8hYK) and your question is specifically about a "squiggles line" -- what tool are you using that shows you this line? The line is a product of that tool and you haven't mentioned what tool it is. – Drew Dormann Mar 04 '21 at 20:37
  • @DrewDormann I'm using Visual Studio Code. – fatimaa Mar 19 '21 at 19:35

1 Answers1

0

Change int32_t to int

And never use #include <bits/stdc++.h>.

Remy Lebeau
  • 454,445
  • 28
  • 366
  • 620