鑑於打印出屏幕矩形的其餘兩個邊時,兩條邊作爲參數給出一個函數的定義:錯誤的引用:
static void restPuncte (Punct &x, Punct &y);
及其實施:
void restPuncte (Punct &x, Punct &y)
{
Punct c;
c.MutaX(x.GetX());
c.MutaY(y.GetY());
Punct d;
d.MutaX(y.GetX());
d.MutaY(x.GetY());
std::cout << "Punctul C este:" << c << std::endl;
std::cout << "Punctul D este:" << d << std::endl;
}
主我得到試圖建立項目時出現以下錯誤:
"Punct::restPuncte(Punct&, Punct&)", referenced from:
主要WO可以是:
#include <iostream>
#include "punct.h"
using namespace std;
int main()
{
Punct firstPoint(1,2);
Punct thirdPoint(4,3);
cout << "Determinarea celorlalte doua colturi" << endl;
cout << "Cele doua puncte sunt:" << firstPoint << " si " << thirdPoint <<endl;
Punct::restPuncte(firstPoint,thirdPoint);
return 0;
}
你能告訴我什麼是我做錯了嗎?謝謝!
錯誤的其餘部分是什麼? – Corbin 2013-02-27 16:41:18