QueueList throws an error with my class. Why?

Hi there
I have a class declaration:

class TimeLine
{
  public:
    bool IsExecuted;
    DateTime Timestamp;
    int Command;
    int Argument;
};

I declare it as

TimeLine item;

Then I try to add a bunch of its instances to a Queue:

for (int i=0; i<3; i++)
         { 
            item = new TimeLine(); 
            timeLines.push(item); 
         }

timeLines is the QueueList

It cannot compile this. It throws the following:

no match for ‘operator=’ (operand types are ‘TimeLine’ and ‘TimeLine*’)

If I change declaration to

TimeLine* item = new TimeLine();

no go again. It throws

no match for ‘operator=’ (operand types are ‘TimeLine’ and ‘TimeLine* @’)

How to place the instances of my class to the QueueList?
Thanks.

where do you define the timeLines object? where do you define the push() method?

timeLines.push(item);

why are you attempting to create this object three times?

for (int i=0; i<3; i++)
         { 
            item = new TimeLine();

did you intend to create an array of three objects?

where do you define the timeLines object?

It is “global” declaration in the top of my program right after including:

QueueList timeLines;

where do you define the push() method
Nowhere. It is the lib functionality I described in subject.

why are you attempting to create this object three times?
I need to create a Queue of objects. It’ll be the queue of 33 minimum, not 3.

did you intend to create an array of three objects?
I use QueueList, please see the subject again.

Thanks.

posting code fragments and references to obscure libraries won't allow for a lot of help.

Why not post a representative (small) complete code that gives your errors...?

It is "global" declaration in the top of my program right after including:

QueueList <TimeLine> timeLines;

Why on earth are you declaring an object of type list of TimeLine objects and then trying to store pointers to TimeLine objects in the list?

A smart(er) person would declare that timeLines was a QueueList<TimeLine*>.

PaulS:
A smart(er) person would declare that timeLines was a QueueList<TimeLine*>.

Then you must also have a redundant list of TimeLine objects. Seems overly wasteful if you can have the queue look after the storage.

All you need to ensure is that there is an assignment operator provided to copy the temporary data into the object stored in the queue.