Click here to Skip to main content
15,896,207 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questioniinternetprotocol Pin
john_36929-Apr-09 4:34
john_36929-Apr-09 4:34 
QuestionHOW to debug ATL dotnet 2008 step by step Pin
john_36929-Apr-09 4:29
john_36929-Apr-09 4:29 
QuestionCopy file to remote host Pin
Jack Rong28-Apr-09 8:44
Jack Rong28-Apr-09 8:44 
AnswerCross Posted Pin
led mike28-Apr-09 8:58
led mike28-Apr-09 8:58 
QuestionNeed a solution. Pin
rana ray26-Apr-09 21:24
rana ray26-Apr-09 21:24 
QuestionInstall ActiveX in non-admin Pin
p_196026-Apr-09 3:35
p_196026-Apr-09 3:35 
AnswerCross Posted Pin
led mike27-Apr-09 4:37
led mike27-Apr-09 4:37 
Questionproblem in porting template class from VS6.0 to VS2008 Pin
Hemant kulkarni25-Apr-09 3:21
Hemant kulkarni25-Apr-09 3:21 
I have a class which is using the float as template parameter . The code compiles correctly in VC6.0. But in VS2008 float is not allowed as template paramemter. So i am using the float pointer(please let me know if there is any alternative other than using int as data type). when I compile the code I get following errors at multiple places

syntax error : missing ',' before identifier 'lowerBound'
syntax error : missing ',' before identifier 'upperBound'
'tBoundedType' : too many template arguments

How can fix this? what is error in this class declaration

here is my float pointer class declaration

#ifndef tBoundedType_h

#define tBoundedType_h

#define CLASSID_TBOUNDEDTYPE 27

template<float float="" upperbound="">

class tBoundedType

{

public:

tBoundedType(); // Sets the value to lowerBound.

tBoundedType(float * value);

// An Ensure fails if value is not between lowerBound and upperBound.





// tBoundedType<float float="" upperbound=""> & operator=(float *);

// An Ensure fails if value is not between lowerBound and upperBound.

static float LowerBound() { return lowerBound; }

static float UpperBound() { return upperBound; }

// operator type() const { return mValue; }

// Stream me

//virtual void PerformIO(tNSStream *);

virtual long GetClassId() const { return CLASSID_TBOUNDEDTYPE; }

long GetVersion() const { return 1; }

protected:

float mValue;

};





template<float float="" upperbound="">

tBoundedType<lowerbound,>::tBoundedType()

: mValue(*lowerBound)

{

}



template<float float="" upperbound="">

tBoundedType<float float="" upperbound="">::tBoundedType(float * newValue)

: mValue(*newValue)

{

Ensure(mValue >= *lowerBound);

Ensure(mValue <= *upperBound);

}



template<float float="" upperbound="">

tBoundedType<float upperbound=""> & tBoundedType<float float="" upperbound="">::operator=(type newValue)

{

Ensure(newValue >= lowerBound);

Ensure(newValue <= upperBound);

mValue = *newValue;

return *this;

}

template<float float="" upperbound="">

void tBoundedType<float float="" upperbound="">::PerformIO( tNSStream *stream )

{

//int version = GetVersion();

//stream->DoIO( version );

//stream->DoIO( mValue );

}
AnswerRe: problem in porting template class from VS6.0 to VS2008 Pin
Stuart Dootson25-Apr-09 3:35
professionalStuart Dootson25-Apr-09 3:35 
QuestionAnother DLL problem. Pin
rana ray24-Apr-09 4:58
rana ray24-Apr-09 4:58 
AnswerRe: Another DLL problem. [modified] Pin
Mark knight12319-Jan-11 23:57
Mark knight12319-Jan-11 23:57 
QuestionCalling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
rana ray23-Apr-09 5:08
rana ray23-Apr-09 5:08 
AnswerRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
Stuart Dootson23-Apr-09 6:59
professionalStuart Dootson23-Apr-09 6:59 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
rana ray23-Apr-09 19:37
rana ray23-Apr-09 19:37 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
Stuart Dootson23-Apr-09 20:09
professionalStuart Dootson23-Apr-09 20:09 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
rana ray23-Apr-09 21:00
rana ray23-Apr-09 21:00 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
Stuart Dootson23-Apr-09 21:11
professionalStuart Dootson23-Apr-09 21:11 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
rana ray24-Apr-09 4:39
rana ray24-Apr-09 4:39 
GeneralRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
Stuart Dootson24-Apr-09 7:39
professionalStuart Dootson24-Apr-09 7:39 
QuestionRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
Roger Stoltz23-Apr-09 21:37
Roger Stoltz23-Apr-09 21:37 
AnswerRe: Calling a COM DLL(built in visual studio 2008) from a COM DLL VC++ (visual studio 6.0) Pin
rana ray24-Apr-09 4:57
rana ray24-Apr-09 4:57 
QuestionHow to retrieve the Windows media player's interface point where the WMP is embeded in web page. Pin
zhaoyu16222-Apr-09 19:30
zhaoyu16222-Apr-09 19:30 
QuestionHow to Convert String Array to LPWSTR* Pin
ANURAG VISHNOI22-Apr-09 18:43
ANURAG VISHNOI22-Apr-09 18:43 
AnswerRe: How to Convert String Array to LPWSTR* Pin
Stuart Dootson22-Apr-09 21:26
professionalStuart Dootson22-Apr-09 21:26 
GeneralRe: How to Convert String Array to LPWSTR* [modified] Pin
ANURAG VISHNOI22-Apr-09 23:33
ANURAG VISHNOI22-Apr-09 23:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.