bug {was not declared in this scope}
使用自己定义的结构体作为返回值的时候,出现了
。。。was not declared in this scope
检查了各种头文件,把缓存也都删掉了还是不行。
结果,发现,应该这样用vector<MyClass:: myStruct>
error: ‘particle’ was not declared in this scope
vector<particle> Pfloc::pf_init_particles(particle* particles,unsigned x0,unsigned y0)
^
/home/xy/code/pfloc_ubuntu/src/pfloc.cpp::: error: template argument is invalid
vector<particle> Pfloc::pf_init_particles(particle* particles,unsigned x0,unsigned y0)
^
/home/xy/code/pfloc_ubuntu/src/pfloc.cpp::: error: template argument is invalid
/home/xy/code/pfloc_ubuntu/src/pfloc.cpp::: error: prototype for ‘int Pfloc::pf_init_particles(Pfloc::particle*, unsigned int, unsigned int)’ does not match any in class ‘Pfloc’
vector<particle> Pfloc::pf_init_particles(particle* particles,unsigned x0,unsigned y0)
^
In file included from /home/xy/code/pfloc_ubuntu/src/pfloc.cpp:::
/home/xy/code/pfloc_ubuntu/include/pfloc.h::: error: candidate is: std::vector<Pfloc::particle> Pfloc::pf_init_particles(Pfloc::particle*, unsigned int, unsigned int)
vector<particle> pf_init_particles(particle* p,unsigned x0, unsigned y0);
^
/home/xy/code/pfloc_ubuntu/include/pfloc.h::: error: ‘typedef struct Pfloc::particle Pfloc::particle’ is private
} particle;
^
/home/xy/code/pfloc_ubuntu/src/pfloc.cpp::: error: within this context
vector<particle> Pfloc::pf_init_particles(particle* particles,unsigned x0,unsigned y0)
bug {was not declared in this scope}的更多相关文章
- 程设刷题 | 编译C++文件出现to_string is not a member of std 或者 to_string was not declared in this scope的解决方法
写在前面 原文链接:Enabling string conversion functions in MinGW C++在将整型.浮点型.长整型等数据类型转换为字符串时,可使用<string> ...
- was not declared in this scope
“was not declared in this scope”是一个错误信息,在编译的时候会遇到.其含义为标识符在其出现的地方是未被定义的. 出现该错误的时候,会同时把未定义的变量名显示出来.比如如 ...
- error: 'LOGE' was not declared in this scope
移植了下HAL,发现编译出现如下错误 error: 'LOGE' was not declared in this scope 比较了一下android4.1的 system/core/include ...
- c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow
c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error ...
- 【QT】error: 'SIGNAL' was not declared in this scope
error: 'SIGNAL' was not declared in this scope 未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...
- 【error】'isnan' was not declared in this scope
error问题 'isnan' was not declared in this scope isnan在cmath中被取消宏定义: // These are possible macros impo ...
- [Error] 'exit' was not declared in this scope的解决方法
新手刚开始用Linux和c++写程序,可能会出现下面的错误 error: ‘exit’ was not declared in this scope 解决方法是 添加 #include <cst ...
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...
- 编译是报error: 'EVNET_COME_TO_FOREGROUND' was not declared in this scope
Compile++ thumb : game_shared <= main.cpp jni/hellocpp/main.cpp: In function 'void Java_org_coco ...
随机推荐
- javascript 日期月份加减
项目中需要用到,自己写了一个.javascript日期按月加减 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xh ...
- MFC编辑框数据实时更新问题
在VC里,很多情况下需要更新控件,也就是调用UpdateData(FALSE);但是如果是在循环中调用该函数,会导致没有时间来刷新界面,消息得不到相应,从外部看来,似乎整个循环只执行了一次Update ...
- CF-839B
B. Game of the Rows time limit per test 1 second memory limit per test 256 megabytes input standard ...
- TextBox控件TextMode="Password"時
TextBox控件TextMode="Password"時,觸發服務器端事件后,會清空掉TextBox的顯示值 2008-07-15 15:06:10| 分类: C#.NET 空 ...
- 《精通Spring4.X企业应用开发实战》读后感第四章
- 极客时间_Vue开发实战_汇总贴
视频地址: https://time.geekbang.org/course/intro/163 https://github.com/tangjinzhou/geektime-vue-1 电脑dem ...
- POJ - 3268 Silver Cow Party SPFA+SLF优化 单源起点终点最短路
Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to ...
- [转] 无监督特征学习——Unsupervised feature learning and deep learning
from:http://blog.csdn.net/abcjennifer/article/details/7804962 无监督学习近年来很热,先后应用于computer vision, audio ...
- ue4 简单数据储存
- 计蒜课/ 微软大楼设计方案/中等(xjb)
题目链接:https://nanti.jisuanke.com/t/15772 题意:中文题诶- 思路:对于坐标为p1(x1, y1), p2(x2, y2) 的两个核心, 其中 x1 <= x ...