I am trying to allocate a node variable on the heap using "new". Im trying to do this in the function enqueue. The error highlights "node* node=new node;" and says that it is the following:"forward declaration of node","must use class tag to refer to type node in this scope","class node is hidden by a non-type declaration of type node here", and "allocation of incomplete type 'class node'. Can you guys tell me what these mean and whats wrong with the statement?
Naming a variable the same as a class is usually not a good idea, why are you naming that pointer variable node when you have a class with that name in the same scope?