|
-
June 5th, 2008, 09:33 AM
#1
C++ queue
Hi,
I am using the following code to create a FIFO queue.
#include <queue>
queue<int> tx_queue;
tx_queue.push(i);
On compiling the vode I get the following error:
'queue' : undeclared identifier
I thought this was declared in #include <queue>. I do not see where the problem is. Any ideas?
-
June 5th, 2008, 09:39 AM
#2
Re: C++ queue
All STL stuff resides in the std namespace, so you either have to fully qualfiy the type name like std::queue<int> or use the the using directive using namespace std.
- Guido
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|