标题:error C2601错误是什么原因
只看楼主
Mycr
Rank: 1
等 级:新手上路
帖 子:203
专家分:0
注 册:2006-9-18
 问题点数:0 回复次数:3 
error C2601错误是什么原因


--------------------Configuration: keyboard - Win32 Debug--------------------
Compiling...
WinAPI.cpp
E:\VC\keyboard\WinAPI.cpp(70) : error C2601: 'InitWindowsClass' : local function definitions are illegal
E:\VC\keyboard\WinAPI.cpp(87) : error C2601: 'InitWindows' : local function definitions are illegal
E:\VC\keyboard\WinAPI.cpp(107) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

keyboard.exe - 3 error(s), 0 warning(s)


[此贴子已经被作者于2006-11-9 10:54:07编辑过]

搜索更多相关主题的帖子: error 
2006-11-09 10:46
wfpb
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2188
专家分:0
注 册:2006-4-2
得分:0 

说过很多次了,朋友,以后有错误直接上MSDN上查询。
输入:C2601
Compiler Error C2601
'function name' : local function definitions are illegal

An attempt was made to define a function within a function.

The following is an example that will generate this error:

int main()
{
int i = 0;

int funcname(int j)
{
j++;
return j;
}

i = funcname(i);
return 0;
}

If you move the function into the global space, outside the main() function, the program will compile and run.


[glow=255,red,2]wfpb的部落格[/glow] 学习成为生活的重要组成部分!
2006-11-09 13:30
Mycr
Rank: 1
等 级:新手上路
帖 子:203
专家分:0
注 册:2006-9-18
得分:0 

版主有没有下载msdn的网址呢?


2006-11-09 16:11
wfpb
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2188
专家分:0
注 册:2006-4-2
得分:0 
额,91软硬件

[glow=255,red,2]wfpb的部落格[/glow] 学习成为生活的重要组成部分!
2006-11-09 17:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-101713-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021835 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved