日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

c语言 error c4028,在Visual Studio2010中,“警告C4028:正式參數1與聲明不同”顯示。...

發(fā)布時間:2024/8/1 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言 error c4028,在Visual Studio2010中,“警告C4028:正式參數1與聲明不同”顯示。... 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

Hi I have the below code

你好,我有下面的代碼。

I am getting the warning as "warning C4028: formal parameter 1 different from declaration"

我得到的警告是“警告C4028:正式參數(shù)1與聲明不同”

I am not sure where i went wrong. I think my declararion of parameter is correct but pls help me.

我不知道我哪里出錯了。我想我的參數(shù)說明是正確的,但請幫助我。

# include

# include

# include

main()

{

int x,y(),z,sqrt(int),cube(int);

printf("Enter any number:");

scanf("%d",&x);

z=(x>y() ? sqrt(x):cube(x));

printf("%d",z);

getche();

return 0;

}

int sqrt(int a)

{

printf("Square:");

return(a*a);

}

int cube(int b)

{

printf("Cube:");

return(b*b*b);

}

int y()

{

return(10);

}

1 個解決方案

#1

5

int x,y(),z,sqrt(int),cube(int);

sqrt is already a C library function declared in math.h with a different prototype.

sqrt已經(jīng)在數(shù)學(xué)中聲明為C庫函數(shù)。h有一個不同的原型。

You have to rename your sqrt function to something else.

你必須將你的sqrt函數(shù)重命名為別的東西。

總結(jié)

以上是生活随笔為你收集整理的c语言 error c4028,在Visual Studio2010中,“警告C4028:正式參數1與聲明不同”顯示。...的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。