-1
所以我使用Visual Studio C++。我目前的程序是這樣創建一個數組,反向...但我得到的錯誤「無效」應該在';'「之前。幫助將不勝感激。void'應該在'之前';'錯誤?
#include <iostream>
using namespace std;
int main()
//this function outputs the array in reverse
void reverse(double* a, int size)
{
for(int i = size-1; i >= 0; --i)//either i=size or i=size-1
{
cout << a[i] << ' ';
}
}
downvoter可以評論爲什麼? – josephthomas 2012-04-07 21:07:10