[try Beta version]
Not logged in

 
simple program not compiling

Sep 16, 2016 at 4:26pm
I installed visual studio 2015
I generated an empy win32 c++ project
It is exactly as this:
#include <string>

int main()
{
return 0;
}
In compilation it generates c2275 illegal use of type
As expression
So what is the problem?
Sep 17, 2016 at 3:50am
The complete error message generated would be more helpful than the portion of one you've supplied.
Sep 17, 2016 at 6:32am
A wild guess but, if you named your file 'main.c' it may cause issues with the header you included since string is a part of C++.
Sep 17, 2016 at 12:07pm
Try using an empty project rather than an Win32 project. I think Win32 is tied to the Visual C++ side of things.
Topic archived. No new replies allowed.