#include <iostream>
using namespace std;
void square (int *);
int main() {
int number = 0;
cout << " To find the square of the number entered by the user ";
cin >> number;
cout << square (&number);
return 0;
}
void square (int *x)
{
*x = *x ** x;
}
的參考找到平方
誰能告訴什麼是錯誤的代碼,因爲它給我一種大長篇奇怪的錯誤要通過指針
爲什麼不張貼錯誤? – 2014-12-07 07:01:00
:錯誤C2679:二進制'<<':找不到操作符找到類型爲'void'的右側操作數(或者沒有可接受的轉換) – 2014-12-07 07:03:24
請問您能否解釋一下,這是該特定錯誤的簡寫形式 – 2014-12-07 07:03:51