分享

error C2001: newline in constant 求指错!!

 昵称7945077 2011-10-19
class student
{
public:
 student(char*pName,int xHours,float xgpa)
 {
  cout<<"constucting student.\n"<<pName<<endl;
  strcpy(name,pName,sizeof(name));
  name[sizeof(name)-1]="\0\";
  semesHours=xHours;
  gpa=xgpa;
 }
 ~student()
 {
  cout<<"destructing student.\n"<<name<<endl;
 }
protected:
 char*name;
 int*semesHours;
 float*gpa;
};
void main()
{
 student ss("Jenny",22,3.5);
}


--------------------Configuration: xueshenglei - Win32 Debug--------------------
Compiling...
xueshenglei.cpp
D:\MSDev98\MyProjects\xueshenglei\xueshenglei.cpp(14) : error C2001: newline in constant
执行 cl.exe 时出错.
xueshenglei.exe - 1 error(s), 0 warning(s)

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多