C++ 期望有一天;声明后错误c++;Xcode?

C++ 期望有一天;声明后错误c++;Xcode?,c++,xcode,class,C++,Xcode,Class,所以我想知道是否有人能阅读代码并看到任何错误: 这是包含错误的文件 #ifndef Game_part_1_Cluenumber2_h #define Game_part_1_Cluenumber2_h #include <iostream> #include "Clue.cpp" #include "casesp1.h" using namespace std; int &refcrimetWo = crime; int clue.setClues(10, 14, 14)(

所以我想知道是否有人能阅读代码并看到任何错误: 这是包含错误的文件

#ifndef Game_part_1_Cluenumber2_h
#define Game_part_1_Cluenumber2_h
#include <iostream>
#include "Clue.cpp"
#include "casesp1.h"
using namespace std;
int &refcrimetWo = crime;
int clue.setClues(10, 14, 14)(){    
}
void clueTwo()
{
    int
    clue.raNdom();
}
#endif
\ifndef游戏第1部分俱乐部第2部分
#定义游戏部分俱乐部2
#包括
#包括“Clue.cpp”
#包括“casesp1.h”
使用名称空间std;
int&refcrimetWo=犯罪;
int-clue.setClues(10,14,14)({
}
void cluewo()
{
int
线索随机();
}
#恩迪夫
这是类文件:

#include "Clue.h"
#include <iostream>
#include <string>
#include<fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
class clue {
    string evidenceop1, evidenceop2, evidenceop3;
public:

    //    int choose (void);
    string werk = "";
    int setClues(int x,int y,int z);

    void raNdom(){


        srand(time(NULL));
        signed int x = rand() %3;
        switch(x){
            case 1:
                werk = evidenceop1;
                break;
            case 2:
                werk = evidenceop2;
                break;
            default:
                werk = evidenceop3;
                break;
        }




    }
//    void fInal(){return werk;};
} Clue;
#包括“Clue.h”
#包括
#包括
#包括
#包括
#包括
#包括
使用名称空间std;
类线索{
字符串证据P1、证据P2、证据P3;
公众:
//int选择(无效);
字符串werk=“”;
int集线索(int x,int y,int z);
void raNdom(){
srand(时间(空));
有符号整数x=rand()%3;
开关(x){
案例1:
werk=证据P1;
打破
案例2:
werk=证据P2;
打破
违约:
werk=证据p3;
打破
}
}
//void fInal(){return werk;};
}线索;
非常感谢,错误出现在
int-clue.setClues(10,14,14)({}


这不是主文件,但在主文件中我从不调用函数

,编译器将此语句视为声明

int clue.setClues(10, 14, 14)(){    
至于我,我不知道这句话是什么意思


首先,除了在声明中将函数用作初始值设定项表达式外,不能在命名空间范围内调用函数。其次,函数的调用方式与您编写的不同。

您认为int-clue.setClues(10,14,14)({}的作用是什么?它应该定义类clueit的变量它应该定义类的值clue@Devilswin这是无效的结构。我在我的帖子里说过这件事。