Solved

vector of queues?

Posted on 2002-03-16
3
1,213 Views
Last Modified: 2013-12-14
I'd like to have a vector of queues in my program but my compiler ( Microsoft Visual C++ 6.0 ) isn't allowing it.  What is wrong with this syntax?

void sysGen(vector<queue<int>>, vector<queue<int>>,
         vector<queue<int>>);
0
Comment
Question by:abstractionz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6872030
The problem is ">>" - the compiler mistakenly interprets that as the right-shift operator ("max-munch"). make your code read

void sysGen(vector<queue<int> >, vector<queue<int> >,
        vector<queue<int> >);  // note the spaces!

0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 6872039
Oh, or you could also

typedef queue<int> int_queue;

void sysGen(vector<int_queue>, vector<int_queue>,
        vector<int_queue>);

or

typedef queue<int> int_queue;
typedef vector<int_queue> vector_of_int_queues;

void sysGen(vector_of_int_queues, vector_of_int_queues,
        vector_of_int_queues);



0
 

Author Comment

by:abstractionz
ID: 6872046
thanks a lot.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question