我已閱讀了有關此特定錯誤的其他問題,但我仍無法理解爲何發生這種情況。參數名稱省略
當我將一個結構hsvoutput傳遞給函數RGBtoH時,它意味着運行函數RGBtoHSV,它將RGB值轉換爲HSV值。然後,我想將這些HSV值保存在我已經定義的結構中:
RGB值來自從PPM圖像獲得的結構。
這是結構定義
struct hsvoutput
{
float hue; // angle in degrees
float saturation;
float value;
};
這是函數
int RGBtoH(int r, int g, int b, struct hsvoutput, int i)
{
float h;
float s;
float v;
RGBtoHSV(r, g, b, &h, &s, &v);
hsvoutput.hue[i] = h;
hsvoutput.saturation[i] = s;
hsvoutput.value[i] = v;
return 0;
}
到底是什麼問題? – Kiloreux
我收到一個參數名稱省略錯誤。 – Trippy