error C2143: syntax error : missing ';' before '}'
来源:互联网 发布:包装设计网站 知乎 编辑:程序博客网 时间:2024/05/19 12:18
1:错误的代码
class name{private:int m_a;public:name(int a=0):m_a(a){}};void main(){name *p[]={new name,new name};}
然后出现的错误提示:error C2143: syntax error : missing ';' before '}'
2:更正的代码:
class name{private:int m_a;public:name(int a=0):m_a(a){}};void main(){name *p[]={new name(0),new name(0)};//必须要有初始化才正确}
1 0
- error C2143: syntax error : missing ';' before '*'问题
- error C2143: syntax error : missing ';' before '*....
- error C2143: syntax error : missing ';' before '*.... 解决...
- error C2143: syntax error : missing ')' before '*'
- error C2143: syntax error : missing ';' before '*'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before '.'
- error C2143: syntax error : missing ';' before '*.... 解决方案
- error C2143: syntax error : missing \';\' before \'type\'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error : missing ';' before '}'
- error C2143:syntax error :missing ‘;’before ‘}’
- error C2143: syntax error : missing ';' before 'namespace'
- error C2143: syntax error : missing ';' before 'type'
- error C2143: syntax error: missing ';' before '__stdcall'
- 简单明了的TestLink配置手册
- Java集合总汇
- leetcode romanToInt
- OpenCV2:Mat属性type,depth,step
- C++文件操作
- error C2143: syntax error : missing ';' before '}'
- 学习笔记
- 怎么让网站在浏览器网址前面显示小图标?
- 设计模式之装饰模式
- 能将pdf转换成html的转换工具
- VBA Mail from Excel with Outlook (Windows)
- IE下的“SCRIPT70: 没有权限”的错误
- 第七章 本源时空(补充)
- [水题] hdu 5349 MZL's simple problem