• 【错误】 y1重定义,以前的定义是“函数”


    前几天定义y1出现这样的报错,没管改成y11就继续写,今天比赛又忘记这个,赶紧上网查查是什么原因,这个y1在math.h里定义过了。继续打开math.h - corecrt_math.h 

     发现,不仅是y1,连j0,j1,jn,y0,yn都被定义了

    作用:

    Function: double j0 (double x)
    j0 returns the Bessel function of the first kind of order 0 of x. It may signal underflow if x is too large.

    Function: double j1 (double x)
    j1 returns the Bessel function of the first kind of order 1 of x. It may signal underflow if x is too large.

    Function: double jn (int n, double x)
    jn returns the Bessel function of the first kind of order n of x. It may signal underflow if x is too large.

    Function: double y0 (double x)
    y0 returns the Bessel function of the second kind of order 0 of x. It may signal underflow if x is too large. If x is negative, y0 signals a domain error; if it is zero, y0 signals overflow and returns -∞.

    Function: double y1 (double x)y1 returns the Bessel function of the second kind of order 1 of x. It may signal underflow if x is too large. If x is negative, y1 signals a domain error; if it is zero, y1 signals overflow and returns -∞.

    Function: double yn (int n, double x)yn returns the Bessel function of the second kind of order n of x. It may signal underflow if x is too large. If x is negative, yn signals a domain error; if it is zero, yn signals overflow and returns -∞.

    大概意思就是返回一个贝塞尔函数什么什么的

    参考:

    Standard library header < math >

    网上说有一个"gentlemen's agreement",在库代码中暴露未记录的标识符会以下划线开头或结尾,用户代码不会,只是为了避免这类问题。

     

    用来解决的build command:

    cl foo.cpp /Feb /D _CRT_DECLARE_NONSTDC_NAMES=0

    感觉这是历史遗留问题。。。。下次手动写y11

  • 相关阅读:
    ABP 使用ElasticSearch、Kibana、Docker 进行日志收集
    Team Foundation Server 2005单服务器版本部署指南
    Echarts 3D地图下钻
    响应式图像与优化
    字节一面:go的协程相比线程,轻量在哪?
    Gopher必读:HttpClient的两个坑位
    客户端禁用Keepalive, 服务端开启Keepalive,会怎么样?
    自古以来,JSON序列化就是兵家必争之地
    Go的优雅终止姿势
    推荐一个好用的浏览器笔记工具
  • 原文地址:https://www.cnblogs.com/xxxsans/p/12732913.html
Copyright © 2020-2023  润新知