I have the following code and getting the compilation errors
baseLib/DynBaseObj.h:80: error: expected constructor, destructor, or type conversion before �(' token
baseLib/DynBaseObj.h:89: error: expected constructor, destructor, or type conversion before �(' token
baseLib/DynBaseObj.h:101: error: expected constructor, destructor, or type conversion before �(' token
///////////////////////////////////////////////////////////////////////////
//
// --Module---------------------------------------------------------------
//
// <<struct> DynBaseObj
//
// Creates object with a value and a pointer.
//
// --Attributes-----------------------------------------------------------
//
// Value
// + Value: T
//
// Prev
// + Prev: DynBaseObj*
//
// Next
// + Next: DynBaseObj*
//
// --Operations-----------------------------------------------------------
//
// DynBaseObj
// + DynBaseObj(val: T)
// + DynBaseObj(val: T, next: DynBaseObj*)
// + DynBaseObj(val: T, prev: DynBaseObj*, next: DynBaseObj*)
//
// --History--------------------------------------------------------------
//
// V01 - DEC 1999 - Luca D'Auria
// Initial release.
// V02 - SEP 2008 - Luca Elia
// Version fixed for g++ 4.3.0.
// V03 - MAY 2009 - Christopher Dimech
// Adopted C++ coding standards based on the IBM Standard C++
// Library Reference Guide and the Ellementel Telecommunication
// Systems Laboratory C++ Style Guide.
// V04 - NOV 2009 - Luca D'Auria
// Code changes after visit to RISSC-Lab.
// V05 - JUL 2011 - Christopher Dimech
// Adopted UML 2.3 for documenting class structure.
//
///////////////////////////////////////////////////////////////////////////
#ifndef DynBaseObj_H
#define DynBaseObj_H
#include <iostream>
#include "gendef.h"
#include "Vector.h"
// ***********************************************************************
// TEMPLATE CLASS: BaseObject
// ***********************************************************************
template <class T>
struct DynBaseObj {
T Value;
DynBaseObj* Prev;
DynBaseObj* Next;
DynBaseObj(T val);
DynBaseObj(
T val,
DynBaseObj* next);
DynBaseObj(
T val,
DynBaseObj* prev,
DynBaseObj* next);
};
//////////////////////////////////////////////////////////////////////////
DynBaseObj(T val) {
Value = val;
Prev = Next = NULL;
}
//////////////////////////////////////////////////////////////////////////
DynBaseObj(
T val,
DynBaseObj* next) {
Value = val;
Prev = NULL;
Next = next;
}
//////////////////////////////////////////////////////////////////////////
DynBaseObj(
T val,
DynBaseObj* prev,
DynBaseObj* next) {
Value = val;
Prev = prev;
Next = next;
}
//////////////////////////////////////////////////////////////////////////
#endif