Skip to main content
Inspiring
Jan 12, 2025 7:42 AM UTC
Answered

Problem with syntax in VSCode

In Visual Studio Code in the jsx file on all lines where #include is used, it gives a problem and suggests using ‘;’ at the end of the line.

What is causing this to happen?

 

sttk3Correct answer
Legend
Jan 12, 2025 9:45 AM UTC

Writing `//@include` instead of `#include` will prevent the error.

//@include '../Test/test-1.jsx'

main() ;

function main() {
  // do something
}

4 replies

sttk3Correct answer
Legend
Jan 12, 2025 9:45 AM UTC

Writing `//@include` instead of `#include` will prevent the error.

//@include '../Test/test-1.jsx'

main() ;

function main() {
  // do something
}
Translate
Inspiring
Jan 12, 2025 9:50 AM UTC

Well, commenting on a line is clearly not a solution to the problem...

Translate
Legend
Jan 12, 2025 9:57 AM UTC

Have you actually tried this method? The code will be imported. Or is it not your goal to avoid errors and include the code?

Translate