gpt4 book ai didi

c++ - 编译器错误 : 'expected unqualified-id before "using '''

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:23:15 32 4
gpt4 key购买 nike

这是我的代码:

    //test file
#include <iostream>
#include "stat.h"
#include "frequency.h"

using namespace std;

int main(){
cout << "helo"<< endl;
return 0;
}

当我尝试编译时,我得到:

    test.cc:7: error: expected unqualified-id before "using"
test.cc:7: error: expected `,' or `;' before "using"

知道这里发生了什么吗?

最佳答案

你可能错过了;在头文件的末尾。

它应该是这样的:

 class frequency {
...
};

关于c++ - 编译器错误 : 'expected unqualified-id before "using ''' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9696352/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com