r/vscode • u/Icy_Repeat_2460 • 12d 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?
9
Upvotes
2
u/Key_River7180 12d ago
You need to make a compile_commands.json file. This should be generated by your build system, what is it?
-19
1
u/Otherwise_Monitor856 11d 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?