6,8.cpp:18:13: error: variable or field ‘chis’ declared void void schet::chis=0;
#include "iostream"
using namespace std;
class schet
{
private:
static unsigned long chis;
public:
///////////////
schet()
{chis++;}
/////////////////////
void write()
{
cout << "Мой порядковый номер " << chis << endl;
}
};
void schet::chis=0;
//////////////////////////
int main()
{
schet a1,a2,a3;
a1.write();
a2.write();
a3.write();
return 0;
}