#include <iostream>
#include <string>
class c1
{
public:
static std::string m1;
static unsigned int m2;
};
//std::string c1::m1 = std::string;
unsigned int c1::m2 = 0;
void main()
{
c1 a;
//std::cout<<a.m1<<std::endl;
std::cout<<a.m2<<std::endl;
}
In this program enabling the two remarked lines causes an error on the first.
error C2275: 'std::string' : illegal use of this type as an expression
What am I doing wrong?