Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Visual Studio vs DevC++ April 12, 2007 08:55AM |
Registered: 18 years ago Posts: 1,501 Rating: 0 |
Re: Visual Studio vs DevC++ April 12, 2007 08:58AM |
Registered: 18 years ago Posts: 1,501 Rating: 0 |
Re: Visual Studio vs DevC++ April 12, 2007 11:19AM |
Registered: 18 years ago Posts: 1,424 Rating: 0 |
cArrayListType<class cNewString>::~cArrayListType() { // some code here }If you don't see this in your header file, then you need to create it or else remove the declaration from your class definition.
Re: Visual Studio vs DevC++ April 12, 2007 11:53AM |
Registered: 18 years ago Posts: 1,424 Rating: 0 |
template<class UserType> class Printer { public: Printer(UserType const &initialValue); void Print(); private: UserType m_value; }; template<class UserType> Printer<UserType>:: Printer(UserType const &initialValue) : m_value(initialValue) {} template<class UserType> void Printer<UserType>:: Print() { cout << "The value is: " << m_value << endl; }
void main() { Printer<int> integerPrinter; Printer<float> floatPrinter; // some other code }Behind the scenes the compiler will create the real classes for these two instances.
class Printer<int> { public: Printer(int const &initialValue); void Print(); private: int m_value; }; Printer<int>:: Printer(int const &initialValue) : m_value(initialValue) {} void Printer<int>:: Print() { cout << "The value is: " << m_value << endl; } class Printer<float> { public: Printer(float const &initialValue); void Print(); private: float m_value; }; Printer<float>:: Printer(float const &initialValue) : m_value(initialValue) {} void Printer<float>:: Print() { cout << "The value is: " << m_value << endl; }
Re: Visual Studio vs DevC++ April 12, 2007 12:25PM |
Registered: 18 years ago Posts: 1,501 Rating: 0 |
Re: Visual Studio vs DevC++ April 12, 2007 12:26PM |
Registered: 18 years ago Posts: 1,501 Rating: 0 |
Re: Visual Studio vs DevC++ April 12, 2007 12:33PM |
Registered: 18 years ago Posts: 1,424 Rating: 0 |