missing ‘{‘ before ‘:’

فني, دکترانه Add comments

این را اینجا می نویسم که اگه یه بد بخت دیگه هم این مشکل رو داشت توی اینترنت گشت راه حل را پیدا کنه نه اینکه یک ساعت وقتش تلف بشه.

Found the solution for this: If you’ve ever figured out what stupid C++ compiler means by “: error C2143: syntax error : missing ‘{‘ before ‘:'” you are a geneous geek.

If you are running x64 windows and compiling a .c file in MATLAB and you’ve already seeing this error even after all the necessary changes in the header file, you may want to change the extension of the file into .cpp! VS C++ 2008+ compiler automatically considers .c files as old C files and .cpp files as C++! No other workaround!

C++ compiler is stupid! Matrix stupid!

Balatarin

One Response to “missing ‘{‘ before ‘:’”

  1. vahid Says:

    Yes.
    C++ is not a good and wise designed language and Microsoft made it dumber and dumber !!

Leave a Reply

WP Theme & Icons.FoxTheme and Localized by Behrang Yarahmadi
Entries RSS Comments RSS