I am confused by your terminology.
If you want a static Queue for your class A (meaning only one Queue exists for all instances of A), and you want to access that from main, you could return a reference or pointer like this:
Code:
// return reference
Queue& A::getMyQueue() { return Queue; }
Code:
// return pointer
Queue* A::getMyQueue() { return &Queue; }
I prefer the first, since the syntax is cleaner and it indicates that the return value will never be null. To use it, you could do either of the following:
Code:
A::getMyQueue().insert( blah );
// or
Queue& myQueue = A::getMyQueue();
myQueue.insert( blah );
Of course, in your example, myQueue is public so there really isn't a need for an accessor and you can just do this:
Code:
A::myQueue.insert( blah );
Is that what you're looking for? It doesn't have anything to do with stack vs heap, though.