vs2012编译C++程序报错C2660:“readparmfile”:函数不接受1个参数 - 爱问答

(爱问答)

vs2012编译C++程序报错C2660:“readparmfile”:函数不接受1个参数

#pragma commment(lib,"VedioMpeg2Enc.lib")

 

int _tmain(int argc,_TCHAR *argv[])

{

  if (argc!=3)

  {

    printf(" %s, %s ",version,author);

    printf("Usage: mpeg2encode in.par out.m2v ");

    exit(0);

  }

 

  /* read parameter file */

  readparmfile(argv[1]);////////////////////////////////////报错处

 

  /* read quantization matrices */

  readquantmat();

 

  /* open output file */

  if (!(outfile=fopen(argv[2],"wb")))

  {

    sprintf(errortext,"Couldn't create output file %s",argv[2]);

    error(errortext);

  }

 

  init();

  putseq();

 

  fclose(outfile);

  fclose(statfile);

 

  return 0;

}


另一工程下创建静态库,函数定义如下:

static void readparmfile(char *fname)

{

  int i;

  int h,m,s,f;

  FILE *fd;

  char line[256];

  static double ratetab[8]=

    {24000.0/1001.0,24.0,25.0,30000.0/1001.0,30.0,50.0,60000.0/1001.0,60.0};

  extern int r,Xi,Xb,Xp,d0i,d0p,d0b; /* rate control */

  extern double avg_act; /* rate control */

 

  if (!(fd = fopen(fname,"r")))

  {

    sprintf(errortext,"Couldn't open parameter file %s",fname);

    error(errortext);

  }

 

这个问题多数是因为在头文件中的函数声明与.cpp文件中的函数定义不一样,比如,我在某cpp文件中定义void addList(USERINFO a)函数,而.h头文件中声明却为extern void addList(),于是在main函数中调用addList(userinfo)时就会有这个错误,修改:把.h头文件中声明改为:extern void addList(USERINFO a)就可以了...

这个要看在程序中readparmfile函数的声明的

下一篇:如何使用vba将excel自动筛选并对筛选的数据列求均值?

上一篇:php做网站需要在数据库创建什么表格

热门标签:
excel 网盘 破解 word dll
最新更新:
微软重新评估新的Outlook的使用时机 联想推出搭载联发科Helio G80芯片组的Tab M9平板 英特尔创新大赛时间确定! 微软Edge浏览器在稳定渠道中推出Workspaces功能 英伟达RTX4060TiGPU推出MaxSun动漫主题! 谷歌地图为用户提供了街景服务! GameSir 在T4 Kaleid中推出了一款出色的控制器! 微软开始在Windows 11 中测试其画图应用程序的新深色模式! LG电子推出全球首款无线OLED电视 英伟达人工智能芯片崭露头角! Steam Deck可以玩什么游戏-Steam Deck价格限时优惠 雷蛇推出CobraPro鼠标 Kindle电子阅读器可以访问谷歌商店吗 Windows10如何加入组策略 window10图片查看器怎么没有了?