类数组初始化 快啊 要灭灯了
为什么VC不行
#include <string.h>
class student
{
char name[33];
public:
student() {}
student (char *p)
{
strcpy(name,p);
name[sizeof(name)-1]='\0';
}
};
#include <iostream.h>
void()
{
student st[2]("zhang","lisi");
}
为什么VC不行
#include <string.h>
class student
{
char name[33];
public:
student() {}
student (char *p)
{
strcpy(name,p);
name[sizeof(name)-1]='\0';
}
};
#include <iostream.h>
void()
{
student st[2]("zhang","lisi");
}
2006-04-17 21:01

2006-04-17 21:03
为什么不能用()初始化
而是=

2006-04-18 20:04

2006-04-24 11:09



2006-04-24 12:34