dynamic stack and dynamic queue Programming Software Development by phony …> // // BELOW TO DECLARE A CLASS NAMED DynStack. class DynStack { private: // // BELOW TO DECLARE A struct…// // BELOW TO ADD THE NUMBER ENTERED TO THE QUEUE. DynStack.enqueue(numbers); count = count + 1; } // cout &… Can't seem to compile this program Programming Software Development by PerplexedWon …;T> *head; // List head pointer public: // Constructor DynStack() { head = NULL; } // Destructor ~DynStack(); // DynStack operations void push(T); void pop(T); bool isEmpty… Can't compile Programming Software Development by Hector_2 …// // ADD STATEMENT BELOW TO DECLARE A CLASS NAMED DynStack. class DynStack { private: // // STATEMENT BELOW TO DECLARE A … // STATEMENT BELOW TO ADD THE NUMBER ENTERED TO THE STACK. DynStack.enqueue(numbers); count = count + 1; } // cout <… Re: dynamic stack and dynamic queue Programming Software Development by tinstaafl … related. for instance you have: bool DynStack<T>:isEmpty() Instead of bool DynStack<T>::isEmpty() As you fix… Re: Can't seem to compile this program Programming Software Development by mike_2000_17 … should be a closing bracket }; at the end of the DynStack declaration. And consequently, you should erase the closing bracket at… these should all be ListNode<T> and not DynStack. Line 121: You need to add std:: in front … to provide a type for the class template DynStack. It should be [ICODE]DynStack<int>[/ICODE] With all the above… Compiling Errors with Dynamic stack class Programming Software Development by jdpjtp910 …* //********************************************************* template <class T> void DynStack<T>::push(T num) { StackNode *…* //********************************************************* template <class T> bool DynStack<T>::isEmpty() { bool status; if… Problem with dynamic template stack Programming Software Development by GWalk612 …double)(RAND_MAX)+(double)(1))); } return 0; }[/CODE] Here's my DynStack header... [CODE]#ifndef DYNSTACK_H #define DYNSTACK_H #include <iostream>…; //pointer to the stack top; public: //constructor DynStack() { top = NULL; } //destructor ~DynStack(); //stack operations void push(T); void pop(T … Re: Problem with dynamic template stack Programming Software Development by GWalk612 …; //destructor template <class T> DynStack<T>::~DynStack() { StackNode *nodePtr, *nextNode; //position … } } //push template <class T> void DynStack<T>::push(T val) { StackNode *newNode; …; } } //pop template <class T> void DynStack<T>::pop(T &val) { StackNode *temp… Re: Can't compile Programming Software Development by rubberman You haven't defined the Stacknode class, but are trying to instantiate constructors and other methods inside the template Dynstack class. This is not valid C++ code, at least to my knowledge. Re: Problem with dynamic template stack Programming Software Development by Tom Gunn [QUOTE][CODE] DynStack<double> doubleStack(); DynStack<float> floatStack(); [/CODE][/QUOTE] C++ syntax is kind … the syntax no longer looks like a function: [code=cplusplus] DynStack<double> doubleStack; DynStack<float> floatStack; [/code] Re: Problem with dynamic template stack Programming Software Development by GWalk612 … the parantheses. error LNK2019: unresolved external symbol "public: __thiscall DynStack<double>::~DynStack<double>(void)" Re: Problem with dynamic template stack Programming Software Development by Tom Gunn You didn't implement the destructor or any of the other methods in the DynStack class. The only method with a body is the default constructor. Re: Can't seem to compile this program Programming Software Development by WaltP To avoid this problem in the future, compile often. Write the basic code framework first (includes, main(), return) and compile. Write a class and compile. Make sure it compiles clean. Write the next class and compile. Write a function and compile. Keep adding and compiling, fixing any errors immediately as you go. Re: Can't seem to compile this program Programming Software Development by PerplexedWon Thanks a million for your help Mike_2000_17. I will make an effort to keen my eye for these type-o. :) Re: Can't compile Programming Software Development by Hector_2 Thank you! I fixed it! I started it over again. Re: Compiling Errors with Dynamic stack class Programming Software Development by Narue [QUOTE]I know it has something to do with my default constructor[/QUOTE] You're correct. That "something" is the fact that you don't have a default constructor. A default constructor is only generated for you if there are no other user-defined constructors in the class. Re: Compiling Errors with Dynamic stack class Programming Software Development by jdpjtp910 so how do I resolve this error? Re: Compiling Errors with Dynamic stack class Programming Software Development by Narue Add a default constructor? Re: Problem with dynamic template stack Programming Software Development by Tom Gunn [QUOTE]It's worked for other programs I don't know why it wouldn't work here.[/QUOTE] In the other programs you weren't working with a template class. The whole definition of the template class has to be in one file, you can't split it up without using the export keyword. Unfortunately, export is not supported by many compilers. Check your …