Closed jadonmmiller closed 3 years ago
I don't use CodeBlocks for C++ development, however, I've just tried adding a .cpp
file to the project with an namespace, and it seems to compile without issues. Are you using a different file extension?
Oops! Believe it or not, namespaces (a C++ feature) don't work in a .c (C Code) file! 😄
After renaming main.c to main.cpp, it works great!
When I try to compile my project, which contains c++ files, I get an "unknown type name 'namespace'" error.
How do I set CodeBlocks to compile with C++?
Thanks!