不能在Netbeans IDE 7.2中包含队列/堆栈C++STL类
Cant include queue/stack C++ STL classes in Netbeans IDE 7.2
我在C++中使用Netbeans 7.2 IDE实现音乐项目,该项目涉及处理声音信息。我想使用STL队列和堆栈类来处理和弦结构。我的问题是IDE无法识别std::queue或std::stack类,并且在它们旁边出现了可怕的红色感叹号。如果没有这些课,我看不出我怎么能取得更大的进步。这是我的密码。提前谢谢。。
#ifndef CHORD_H
#define CHORD_H
#include "../tonestatdynlib/name_pitchstructure.h"
class chord {
public:
chord(int chordNum);
chord (int chordNum, bool stability);
chord(const chord& orig); //copy constructor for use in generative procedure
std::queue<pitchStats> _constituents;
std::string flatPitchList(); //returns a flat pitchname list from chord members
virtual ~chord();
private:
int _chordNumber;
bool _stable;//unless switched otherwise
};
#endif /* CHORD_H */
您需要
#include<queue>
#include<stack>
能够使用std::queue和std::stack
#include <stack>
#include <queue>
您需要包含这些类的头。
#include <queue>
#include <stack>
相关文章:
- 堆栈和队列是否像C++中的数组一样传递?
- 了解使用堆栈实现队列的递归调用机制
- 为什么某些 STL 容器(堆栈、队列、优先级队列)不支持迭代器?
- 嵌套容器:为什么我无法访问堆栈队列顶部的堆栈?C++
- 堆栈和队列的C++默认实现
- 前缀表示法 C++,分段错误(堆栈和队列)
- 将元素从队列复制到堆栈
- 具有父类和虚拟函数的堆栈和队列
- 在C++中使用队列和堆栈对 2 个向量进行加减
- 在堆或堆栈上分配的 std::队列的内存
- 使用提升库在队列和堆栈数据结构上保存和加载数据时出错
- 尝试使用堆栈创建队列.为什么我会遇到int转换错误的空白
- 堆栈,队列延迟
- 将双重链接列表与C 中的堆栈和队列类链接
- 堆栈和队列在 Dev-C++ 中给出错误
- 根据堆栈类实现队列类的复制构造函数
- 不能在Netbeans IDE 7.2中包含队列/堆栈C++STL类
- 为什么我不能使用大括号括起来的初始值设定项列表构造队列/堆栈?(C++11)
- 从庸医(队列/堆栈)中包含的圆形数组顶部弹出一个项目
- 组合队列/堆栈的 c++ 实现