class abc
{
public:
int x;
};
abc b1;
b1.x=10;
int main()
{
}
why can't we write this b1.x=10;
outside of the main function?
it shows error if we write b1.x=10;
outside of the main function, why?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…