Write your question here.
when I try to compile my project this happen
C:\Program Files (x86)\CodeBlocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\mingw32\bits\c++config.h|194|error: expected initializer before 'namespace'|
C:\Program Files (x86)\CodeBlocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\postypes.h|98|error: 'ptrdiff_t' does not name a type|
and more
this is the code,
ther first file
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
void hi()
{
std::cout << " hi ";
}
int main()
{
std::cout <<"hi";
hi();
}
when I put ; after void hi() in header problems it worked
but the problem is werid when I complie.
it launch new file
the name is c++config.h what is that???
and pls answer fast.
Try to make a new application when you get in Visual Studio open Empty project in there you can add your cpp and h files.The compiler won't add you anything I believe.I make projects that way .Compile it and debbug it.
I do not know for codeblock but here is online debbuger it is very good in my opinion https://www.onlinegdb.com/ here you can create 3 seperate files and write your functions.
Visual Studio Community
A fully-featured, extensible, free IDE for creating modern applications for Android, iOS, Windows, as well as web applications and cloud services.
https://visualstudio.microsoft.com/vs/community/