c++ - Static classes C ++ -
#include"stdafx.h" #include"iostream" using namespace std; static class base{ public: int = 3; }; int main(){ base ob; system("pause"); return 0; }
please tell me, "static" in class declaration?
"please tell me, "static" in class declaration? thank."
it nothing, ignored compiler (with vs 2013 seems). there's warning issued this:
source_file.cpp(9) : warning c4091: 'static ' : ignored on left of 'base' when no variable declared
see live compiler sample here please.
Comments
Post a Comment