[Solved] error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token


You are trying to compile C++ code as C. C and C++ are different languages, and your C compiler is complaining about C++-specific syntax.

Try compiling the code as C++. For most compilers it should be sufficient to rename your file main.cpp.

1

solved error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token