Search code examples
c++sfml

how can i fix this sfml header file namespace error?


i start sfml but can't success tutorial because of..

enter image description here

and it says

The variable "namespace" is not a type name.
4723 error code

What should i do?


Solution

  • You are trying to compile C++ code as C code. You get an error because namespace is a C++ concept.

    Rename your file to test.cpp.