zoukankan      html  css  js  c++  java
  • VS 报cmath(19): error C2061: 语法错误: 标识符“acosf” 错误

    这是因为我在.c文件中用了

    #include <iostream>

    using namespace std;

    这样编译的时候就报:

    出现错误类型如下:
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(19): error C2061: 语法错误: 标识符“acosf”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(19): error C2059: 语法错误:“;”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(19): error C2061: 语法错误: 标识符“asinf”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(19): error C2059: 语法错误:“;”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(20): error C2061: 语法错误: 标识符“atanf”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(20): error C2059: 语法错误:“;”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(20): error C2061: 语法错误: 标识符“atan2f”
    1>c:program files (x86)microsoft visual studio 10.0vcincludecmath(20): error C2059: 语法错误:“;”

     

    解决方案是:

    将.c后缀改为.cpp就可以了

  • 相关阅读:
    5月29 流程
    5月27 权限设置及功能
    5月26 留言板练习题
    5月24 文件操作
    5月23 文件上传及图片上传预览
    5月23 注册审核
    5月21 回话控制SESSION COOKIE
    5月21 汽车查询及批量删除----php方法
    5月21 练习AJAX的查看详细及批量删除
    5月20 三级联动
  • 原文地址:https://www.cnblogs.com/AI-Algorithms/p/3956645.html
Copyright © 2011-2022 走看看