错在那里!!!!
#include "iostream.h"
void main()
{
struct abc
{
char name[20];
char job[20];
int age;
}ad1;
ad1.name[]="tom";
ad1.job[]="abc";
ad1.age=15;
cout<<ad1;
}
--------------------Configuration: 点的操作符 - Win32 Debug--------------------
Compiling...
点的操作符.cpp
D:\VC\点的操作符.cpp(13) : error C2059: syntax error : ']'
D:\VC\点的操作符.cpp(14) : error C2059: syntax error : ']'
D:\VC\点的操作符.cpp(16) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'struct main::abc' (or there is no acceptable conversion)
执行 cl.exe 时出错.