none
Building a win32 Console Application/Getting a compile error in cstdlib.h

    السؤال

  • My source code is including stdlib.h, not sure why cstlib.h is included or whether it is in fact needed.
    I am coming from Unix C++ environement.
    Please suggest.

    Error : c:\program files\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2143: syntax error : missing '{' before ':'
    on this line
    using ::size_t; using ::div_t; using ::ldiv_t;

    20/ذو القعدة/1429 09:47 م

الإجابات

  • I think maybe you're compiling your code as C rather than as C++. Either ensure your source file name has a .cpp extension rather than a .c extension, or pass the compiler the /TP flag.
    • تم وضع علامة كإجابة بواسطة jack 321 26/ذو القعدة/1429 02:17 ص
    20/ذو القعدة/1429 09:57 م

جميع الردود