0

I am attempting to use a queue. I am doing it just like an example i read. I am doing a vs2005 form applicaiton.

#pragma once
#include <queue>

public ref class DataSource
{
public:
	DataSource(void);
	
	void DSInitilize(void);

	char*				   getNextElement(void);
	System::Void		   setNextElement(char* value);

private:
	queue<char>			   MessageQueue;
};

It is not finding the data type of the queue<char> messageQueue declaration.

here are the errors:

error C2143: syntax error : missing ';' before '<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2238: unexpected token(s) preceding ';'

I am going to fill each element with char*. I dont know why I am getting this error. Any advice?

Thanks.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by ArkM
0

All STL classes are declared in namespace std. Open namespaces with using namespace std; or use fully qualified name as std::queue .

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.