#include "dsound.h"时编译指向dsound.h内报错
d:\代码测试_git\directsound\directsound\dsound.h(230): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(230): error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>d:\代码测试_git\directsound\directsound\dsound.h(230): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(349): error C2146: 语法错误: 缺少“;”(在标识符“lpwfxFormat”的前面)
1>d:\代码测试_git\directsound\directsound\dsound.h(349): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(349): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(365): error C2146: 语法错误: 缺少“;”(在标识符“lpwfxFormat”的前面)
1>d:\代码测试_git\directsound\directsound\dsound.h(365): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(365): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(416): error C2146: 语法错误: 缺少“;”(在标识符“lpwfxFormat”的前面)
1>d:\代码测试_git\directsound\directsound\dsound.h(416): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(416): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(425): error C2146: 语法错误: 缺少“;”(在标识符“lpwfxFormat”的前面)
1>d:\代码测试_git\directsound\directsound\dsound.h(425): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(425): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>d:\代码测试_git\directsound\directsound\dsound.h(686): error C2061: 语法错误: 标识符“LPWAVEFORMATEX”
1>d:\代码测试_git\directsound\directsound\dsound.h(696): error C2061: 语法错误: 标识符“LPCWAVEFORMATEX”
1>d:\代码测试_git\directsound\directsound\dsound.h(770): error C2061: 语法错误: 标识符“LPWAVEFORMATEX”
1>d:\代码测试_git\directsound\directsound\dsound.h(780): error C2061: 语法错误: 标识符“LPCWAVEFORMATEX”
1>d:\代码测试_git\directsound\directsound\dsound.h(1041): error C2061: 语法错误: 标识符“LPWAVEFORMATEX”
1>d:\代码测试_git\directsound\directsound\dsound.h(1099): error C2061: 语法错误: 标识符“LPWAVEFORMATEX”
先引用mmsystem.h即可,如下:
#include <mmsystem.h>
#include "dsound.h"