我的写的是这样啊,我先创建对象数组person p[100],然后就定义FILE *fp;用他作为文件的读写指针,用fopen
和fwrite打开和写入,就出现如下错误:
//-------------------------------------------------------------------------------------------------
财富排行.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
查询模块.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
存款.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
计算利息.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
开户.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
取款.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
主菜单.obj : error LNK2005: "class person * p" (?p@@3PAVperson@@A) already defined in personc.obj
Debug/小伟.exe : fatal error LNK1169: one or more multiply defined symbols found
执行 link.exe 时出错.
//--------------------------------------------------------------------------------------------------
那位大哥会快帮帮小弟吧,谢谢!
关于对象数组创建后能否用C的文件操作打开和写入,写了个编译出错,在等