在VC++ 6.0上发现的问题,求大牛指点

wzz19901226 2011-12-05 12:19:38
今天做了个音频播放控制器,但是在最后编译的时候没有通过,在CSDN上也有找到类似的问题,根据他们的提示,我都试了试他们的方法,但是还是没有用。
语法错误为 syntax error missing ' ' before identifier 'mmversion'


有人说加头文件 #include<windows.h> ,但是没用。


有知道的吗?求大神指教
...全文
181 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
goodbye_mylove 2011-12-07
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 wzz19901226 的回复:]
3Q,我去试试 不过还是不能通过





这是什么意思?路径错了吗?
[/Quote]

I can't see your error message.
赵4老师 2011-12-06
  • 打赏
  • 举报
回复
偶遇到类似问题都是用
“每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。”
的方法解决的。
wzz19901226 2011-12-06
  • 打赏
  • 举报
回复
3Q,我去试试 不过还是不能通过





这是什么意思?路径错了吗?
goodbye_mylove 2011-12-06
  • 打赏
  • 举报
回复
try this : link the library - "winmm.lib" :

#pragma comment(lib, "winmm.lib")

insert this instruction before include header file.
goodbye_mylove 2011-12-06
  • 打赏
  • 举报
回复
try this : link the library - "winmm.lib" -


#pargma comment(lib,"winmm.lib")
#include <windows.h>
#include <mmsystem.h>
/*
your code
*/

wzz19901226 2011-12-05
  • 打赏
  • 举报
回复

#if !defined(AFX_STDAFX_H__2C36EF81_AAA8_4B90_9DD8_D7646078C9F0__INCLUDED_)
#define AFX_STDAFX_H__2C36EF81_AAA8_4B90_9DD8_D7646078C9F0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers


#include<mmsystem.h> // MFC
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT





//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__2C36EF81_AAA8_4B90_9DD8_D7646078C9F0__INCLUDED_)


这是stdfax.h 里面所有的代码。 下面是错误代码:
error C2146: syntax error : missing ';' before identifier 'MMVERSION'
d:\资料\vc98\include\mmsystem.h(113) : fatal error C1004: unexpected end of file found

加入头文件什么的都试过,求正确结果
iluo 2011-12-05
  • 打赏
  • 举报
回复
你看下Include中有没有那个头文件,没有才要加进去
bEst_02 2011-12-05
  • 打赏
  • 举报
回复

#include <windows.h>
#include <mmsystem.h>
Gloveing 2011-12-05
  • 打赏
  • 举报
回复
一般还是你没有包含必要的 头文件,或者没有连接必须的库文件;
贴代码吧
bqw2008 2011-12-05
  • 打赏
  • 举报
回复
代码贴出来

64,654

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧