小弟初学C++ 第一个作业就有问题~实在不懂了 求指教~
小弟初学C++ 第一个作业就有问题~实在不懂了 求指教~#include<iostream>
using namespace std;
{
cout<<"sizeof(char) :"<<sizeof(char)<<endl;
cout<<"sizeof(bool) :"<<sizeof(bool)<<endl;
cout<<"sizeof(short) :"<<sizeof(short)<<endl;
cout<<"sizeof(int) :"<<sizeof(int)<<endl;
cout<<"sizeof(unsigned) :"<<sizeof(unsigned)<<endl;
cout<<"sizeof(long) :"<<sizeof(long)<<endl;
cout<<"sizeof(float) :"<<sizeof(float)<<endl;
cout<<"sizeof(double) :"<<sizeof(double)<<endl;
cout<<"sizeof(long double) :"<<sizeof(long double)<<endl;
system("pause");
}
错误 1 error C2447: “{”: 缺少函数标题(是否是老式的形式表?) c:\users\ace\documents\visual studio 2008\projects\biabia1\biabia1\数据类型长度.cpp 3 biabia1