error: expected constructor, destructor, or type conversion before '.' token

error: expected constructor, destructor, or type conversion before '.' token  

找了半天原因,原来是犯了基础知识不扎实的错误,C++中,全局阈只能声明、初始化变量; 不能用于赋值、运算、调用函数等!!!

原文地址:https://www.cnblogs.com/new-comer/p/5271719.html