首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

为什么小弟我照着书做还会出错,请进来看

2013-03-01 
为什么我照着书做还会出错,请进来看这是出错的信息:Deleting intermediate files and output files for pr

为什么我照着书做还会出错,请进来看
这是出错的信息:
Deleting intermediate files and output files for project '1 - Win32 Debug'.
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
f:\vc98\include\windef.h(310) : error C2143: syntax error : missing ';' before '*'
f:\vc98\include\windef.h(310) : error C2501: 'PPOINT' : missing storage-class or type specifiers
f:\vc98\include\windef.h(310) : error C2501: 'NPPOINT' : missing storage-class or type specifiers
f:\vc98\include\windef.h(310) : error C2501: 'LPPOINT' : missing storage-class or type specifiers
f:\vc98\include\wingdi.h(2844) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(2885) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3191) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3193) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3556) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3576) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3600) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3601) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3610) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3612) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3614) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3615) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3619) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3645) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\wingdi.h(3646) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\winuser.h(6262) : error C2146: syntax error : missing ')' before identifier 'lpPoint'
f:\vc98\include\winuser.h(6262) : warning C4229: anachronism used : modifiers on data are ignored
f:\vc98\include\winuser.h(6262) : error C2491: 'GetCursorPos' : definition of dllimport data not allowed
f:\vc98\include\winuser.h(6262) : error C2440: 'initializing' : cannot convert from 'int *' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
f:\vc98\include\winuser.h(6262) : error C2059: syntax error : ')'
f:\vc98\include\winuser.h(6332) : error C2146: syntax error : missing ')' before identifier 'lpPoint'
f:\vc98\include\winuser.h(6332) : warning C4229: anachronism used : modifiers on data are ignored


f:\vc98\include\winuser.h(6332) : error C2491: 'GetCaretPos' : definition of dllimport data not allowed
f:\vc98\include\winuser.h(6332) : error C2440: 'initializing' : cannot convert from 'int *' to 'int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
f:\vc98\include\winuser.h(6332) : error C2059: syntax error : ')'
f:\vc98\include\winuser.h(6339) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\winuser.h(6346) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\winuser.h(6354) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\include\shellapi.h(62) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(607) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(608) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(758) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(761) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(800) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(850) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(851) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(872) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(978) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(2057) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(2059) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxwin.h(2061) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(203) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(217) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(275) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(838) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(912) : error C2061: syntax error : identifier 'LPPOINT'
f:\vc98\mfc\include\afxcmn.h(939) : error C2061: syntax error : identifier 'LPPOINT'
执行 cl.exe 时出错.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\1.sbr': No such file or directory
执行 bscmake.exe 时出错.

1.exe - 1 error(s), 0 warning(s)
还有:windef.h,wingdi.h,winuser.h,afxwin.h原本都不是我工程里的文件,就是说这些文件都不是我写的,那到底是哪出错?还要其他资料的请问我拿,或者QQ找我面谈。QQ:1838805008.
谢谢各位大神了。


[解决办法]
应该是有什么头文件没include进来。试试:
#include <windef.h>
[解决办法]
看着像是windef.h的问题。
[解决办法]
clean一下试试,以前遇到过这样的问题,忘了怎么解决的了,看来要做笔记啊
[解决办法]

引用:
啊,这算什么回答?我晕~~

~~ 如果是包含头文件的话

在代码顶部加上。。。。~~
[解决办法]
这种情况下问题可能是:
一 书上的程序存在错误或印刷错误。
二 动手写代码太少,遗漏“;”或“}”之类的。
三 也有可能是楼上所说的少了windows的头文件。比如windef.h  建议把源代码贴出来,这样就可以具体分析
[解决办法]
看着那么多错误,有可能就一两个错误,不要被吓到了啊!
慢慢积累哦,多动手,就会有收获,我也要加油学习
[解决办法]
单独 #include <windef.h> 看看

vc2005 #include <windef.h> 没问题。
以前不小心修改过windef.h这个文件了?
[解决办法]
书上的例子,大部分都是运行不过的。 #include <windef.h> 应该加在第一行。
[解决办法]
单点LPPOINT的定义看看?
[解决办法]
偶遇到类似问题都是用
“每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。”
的方法解决的。

不要迷信书、考题、老师、回帖;
要迷信CPU、编译器、调试器、运行结果。

[解决办法]
昨天我也出了这个错误了,我的问题是 include的文件路径不全,到工具-》选项-》文件-》include
把缺少的路径加上。。。希望对你有用

热点排行