大佬教程收集整理的这篇文章主要介绍了警告:从不兼容的指针类型传递参数[默认启用],大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
int main () { // some variables and also a bit of code to read the 'messwerte.txt' printf("Geben sie an wieviele Messwerte ausgelesen werden sollen: "); scanf("%d",&n); double werte[n]; //Array der "fertigen" Messwerte in = fopen ("messwerte.txt","r"); double nul[n]; //Array von nullen int logN = 14; l=FFT(logN,&werte,&nul); }@H_675_2@在同一个文件中,我也在这个程序的帮助下做FFT:
double FFT (int logN,double *real,double *im) //logN is base 2 log(N) { // blabla FFT calculation }@H_675_2@但是,当我编译我总是得到这个错误:
gcc FFT.c -lm FFT.c: In function ‘main’: FFT.c:94:2: warning: passing argument 2 of ‘FFT’ from incompatible pointer type [enabled by default] FFT.c:4:8: note: expected ‘double *’ but argument is of type ‘double (*)[(unsigned int)(n)]’ FFT.c:94:2: warning: passing argument 3 of ‘FFT’ from incompatible pointer type [enabled by default] FFT.c:4:8: note: expected ‘double *’ but argument is of type ‘double (*)[(unsigned int)(n)]’@H_675_2@既然这是我第一次编程,我真的不知道我的代码有什么问题.我必须为编译器或类似的东西设置更多的标志(因为我不得不做这个-lm的东西,或者它不会编译,并且说如pow没有找到的东西)? @H_675_2@此外,我知道在Windows或Linux机器上编写时可能会有所区别,如果是操作系统的问题,我使用的是Linux,Lubuntu 12.10 32位.
以上是大佬教程为你收集整理的警告:从不兼容的指针类型传递参数[默认启用]全部内容,希望文章能够帮你解决警告:从不兼容的指针类型传递参数[默认启用]所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。