这样子该怎么办?
--------------------Configuration: 291-1 - Win32 Debug--------------------
Linking...
291-9.obj : error LNK2005: "int __cdecl main3(void)" (?main3@@YAHXZ) already defined in 291-1-3.obj
Debug/291-1.exe : fatal error LNK1169: one or more multiply defined symbols found
执行 link.exe 时出错.
291-1.exe - 1 error(s), 0 warning(s)
[解决办法]
使用头文件时错误的吧!
好巧,前两天写俄罗斯方块是我也出现这种错误!
给你一个链接,讲的非常好的!
http://blog.csdn.net/liu1028701143/article/details/7359381
[解决办法]
可能是重复include了头文件,可以用预编译解决
在第一行增加代码
#pragma once
或每次include头文件时define一个宏
#ifndef SQLIST_H
#define SQLIST_H