我正在编写一个程序,但是由于某种原因,我无法从 main 访问游戏功能,除了我只收到以下错误:
20:23: error: expected primary-expression before ']' token
这是代码:
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int gameplay (int suitcase[], ofstream outputFile)
{
cout << "Here?";
return 0;
}
int main()
{
const int ARRAY_SIZE = 10;
int suitcase [ARRAY_SIZE] = {1, 10, 100, 1000, 10000, 100000, 1000000, 0, 0, 0};
ofstream outputFile;
outputFile.open ("players.txt");
gameplay(suitcase[], outputFile);
outputFile.close ();
return 0;
}
任何帮助将不胜感激,谢谢!