Schrieffer.zsy 2022-04-04 12:54 采纳率: 93.8%
浏览 9
已结题

库打桩失败,没有运行包装函数?

问题相关代码
// mypow.c
#ifdef COMPILETIME

#include<stdio.h>
#include<math.h>

double mypow(double x,double y){
    double ans=pow(x,y);
    printf("x to the power of y equals:%f",ans);

    return ans;
}

#endif
// pow.h
#define pow(x,y) mypow(x,y)
double mypow(double x,double y);
// test01.c
#include<stdio.h> 
#include<math.h>

int main(){
  printf("Ans=%f\n",pow(3.14,2));
  return(0);
}
运行结果

img


没有运行包装函数。

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 4月12日
    • 修改了问题 4月4日
    • 创建了问题 4月4日