-- 作者:maimarco -- 发布时间:2004-11-10 19:51:01 -- 错了吗?不明白!!!! // sd.cpp : Defines the entry point for the console application. // #include "stdafx.h" struct classd int main(int argc, char* argv[]) |
-- 作者:nearwate -- 发布时间:2004-11-10 21:23:59 -- 因为classd不是系统默认的数据类型, 所以不能像普通char类型那样用=赋值, 只能用strcpy函数, class1.name=bb; 应改为: strcpy(class1.name,bb); 但要在程序头加上一个头文件 #include <string.h> |