开发者社区> 问答> 正文

求C程序报错原因(Unix下)?报错

hisuSOMSApiForDPTestMain.1.0.c: line 25: syntax error near unexpected token `('

hisuSOMSApiForDPTestMain.1.0.c: line 25: `void HisuTestSOMSApiForDP(char *input)'

25:  

void HisuTestSOMSApiForDP(char *input)


这个是报什么错   (跟中文符号没关系)

展开
收起
爱吃鱼的程序员 2020-06-22 11:24:21 493 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    最后一个字符大哥,你少;号这个是函数<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">voidHisuTestSOMSApiForDP(charinput){}可能出错原因是贴一下上下文

    #include"hisuStrFunGrp.h"
    #include"hisuTimeFunGrp.h"
    #include"hisuRunningLog.h"
    #include"hisuErrCodeDef.h"
    #include"hisuFileAndDirFunGrp.h"
    #include"hisuPackRules.h"
    #include"hisuPackFldTagDef.h"


    #include"hisuSOMSApiForDP.h"


    voidHisuTestSOMSApiForDP(char
    input)
    {
    switch(atoi(input))
    {
    case1:
    HisuGetIssueBankCertificationTest();
    break;
    case2:
    HisuGenICCUDKsTest();
    break;
    case3:
    HisuGenICCRSATest();
    break;
    case4:
    HisuGenICCCertAndStaticDataTest();
    break;
    case5:
    HisuEncryptDataFromKeyAToKeyBTest();
    break;
    case6:
    HisuEncryptDataBySpecKeyTest();
    break;
    case7:
    HisuDecryptDataBySpecKeyTest();
    break;
    case8:
    HisuGetICCardVerifyValueTest();
    break;
    case9:
    HisuExpKMUTest();
    break;
    case10:
    HisuGenDataMACTest();
    break;
    case11:
    //HisuGetICCSpecDataTest();
    break;
    case12:
    HisuGenKeyFromRootKeyTest();
    break;
    case13:
    HisuGenDataMACOfSpecAlgTest();
    break;
    case14:
    HisuEncryptByKeyOfSpecAlgTest();
    break;
    case15:
    HisuEncryptFromKeyAToKeyBOfSpecAlgTest();
    break;
    case16:
    HisuGenKeyFromKMCTest();
    break;
    case17:
    HisuGenSessionKeyFromKMCTest();
    break;
    case18:
    HisuGenKeyFromKMUTest();
    break;
    case19:
    HisuEncryptDataFromTKToSessionKeyTest();
    break;
    case20:
    HisuEncryptDataFromSessionKeyAToSessionKeyBTest();
    break;
    case21:
    HisuGenDataMACBySessionKeyTest();
    break;
    case22:
    HisuEncryptDataBySessionKeyTest();
    break;
    case23:
    HisuDecryptDataBySessionKeyTest();
    break;
    case24:
    HisuGenRandDataOfSpecLenTest();
    break;
    case25:
    HisuEncryptKeyFromTKToLMKTest();
    break;
    case26:
    HisuGenKeyFromKMCTest();
    HisuGenSessionKeyFromKMCTest();
    HisuGenKeyFromKMUTest();
    HisuEncryptDataFromTKToSessionKeyTest();
    HisuEncryptDataFromSessionKeyAToSessionKeyBTest();
    HisuGenDataMACBySessionKeyTest();
    HisuEncryptDataBySessionKeyTest();
    HisuDecryptDataBySessionKeyTest();
    HisuGenRandDataOfSpecLenTest();
    HisuEncryptKeyFromTKToLMKTest();
    break;
    case27:
    HisuGenKeysBySpecKeyOfPBOC10Test();
    break;
    case28:
    HisuEncryptDataBySpecKeyOfPBOC10Test();
    break;
    case29:
    HisuDecryptDataBySpecKeyOfPBOC10Test();
    break;
    case30:
    HisuGenICCUDKSMTest();
    break;
     case31:
      HisuGetIssueBankCertificationSMTest();
      break;
     case32:
      HisuGenICCSMTest();
      break;
     case33:
      HisuGenICCCertAndStaticDataSMTest();
      break;
    default:
    printf("选择的[%d]接口不存在\n",atoi(input));
    break;
    }


    return;
    }
    <atarget='_blank'>@aoniao还是一样<atarget='_blank'>@aoniao插入代码也不好使<atarget='_blank'>@aoniao不好意思,我是个新手。不太明白。求指示为什么不用插入代码功能编辑一下代码?把整个函数体注释掉看看,有可能是头文件的问题。注掉同样报错估计是你文件的格式问题,里面隐含了不可及字符,代码看起来正常。

    2020-06-22 11:24:38
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载