2016-01-08 78 views
0

我在C++(Visual Studio中2013)下面的代码在头文件声明函数原型:C++ G711编码器解码器错误

extern "C" __cdecl 
short int 
G_Init(
void *Ptr, 
char Encoding); 

和编译器返回以下错误:

error C2062: type 'short' unexpected

我在做什么错了?

回答

1

MSDN says“变量或函数名前放置__cdecl修改”。

也就是extern "C" short int __cdecl G_Init而不是extern "C" __cdecl short int G_Init

+0

它的工作。谢谢 !! – Madalin