【错误】error: expected declaration specifiers or ‘...’ before string constant

来源:互联网 发布:战旗人气协议软件 编辑:程序博客网 时间:2024/05/18 08:30

在学习开源库mp4v2的时候,调用函数出现了如下错误:

error: expected declaration specifiers or ‘...’ before string constant

error: expected declaration specifiers or ‘...’ before numeric constant

调用的函数代码为:

MP4FileHandle   MP4Create("test.mp4", 0);
在网上找了很久没找到答案,突然发现是因为漏写了函数的返回值。。。正确的代码应该是:

MP4FileHandle  file = MP4Create("test.mp4", 0);

太疏忽了!

0 0
原创粉丝点击