r/vscode • u/Icy_Repeat_2460 • 10d ago
How do I fix this VS code C intellisense problem?

I was trying to make a linked list node structure (Learning Data structures). Then VS code is now marking a error at node, I cant find a fix anywhere. The error message it shows is:
Error: this declaration of struct "Node" does not declare the same type as the declaration at line 3
Meanwhile my code compiles correctly but this red underline is just making me feel uneasy. How do I fix this?
10
Upvotes
1
u/Otherwise_Monitor856 9d ago
What is the file extension? The intelllisense might think this is C++ rather than old C. Also, did you forward declare anything or is that code the whole program?
2
u/DaveX64 10d ago
I typed it out in VSCode on Linux...don't get the red squiggly. Maybe you should check for updates if you haven't and uninstall/reinstall C/C++ Intellisense?
2
u/Key_River7180 10d ago
You need to make a compile_commands.json file. This should be generated by your build system, what is it?
-19
u/flyingron 10d ago
Get a proper IDE. VSCode sucks.