Click here to Skip to main content
16,010,488 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Can I derive from an ATL ActiveX control? Pin
markjmalin26-Oct-06 6:24
markjmalin26-Oct-06 6:24 
QuestionOLE DB app crashes when using non-Access data source Pin
User 1278218-Oct-06 16:45
User 1278218-Oct-06 16:45 
AnswerRe: OLE DB app crashes when using non-Access data source Pin
Jörgen Sigvardsson19-Oct-06 9:51
Jörgen Sigvardsson19-Oct-06 9:51 
GeneralRe: OLE DB app crashes when using non-Access data source Pin
User 1278219-Oct-06 17:53
User 1278219-Oct-06 17:53 
QuestionAtl New Object Pin
With_problem17-Oct-06 16:35
With_problem17-Oct-06 16:35 
QuestionRe: Atl New Object Pin
prasad_som17-Oct-06 19:59
prasad_som17-Oct-06 19:59 
QuestionDCOM in WinXP or samething esle is better [modified] Pin
Greg_moon16-Oct-06 0:12
Greg_moon16-Oct-06 0:12 
Questionwhy triats declaration cannot work? Pin
Yaki_1515-Oct-06 21:21
Yaki_1515-Oct-06 21:21 
i recently coded an Empty Hello Projcet using VC6.0.
this project consists of three files:
1 MySimple.cpp
//----------------------------------------
#include "accum3.h"
#include <iostream>

template< typename T >
inline
typename AccumulationTraits< T >::AccT accum(T const* beg, T const* end)
{
return Accum< T >::accum(beg, end);
}
int main()
{
int num[] = {1,2,3,4,5};
accum(&num[0], &num[5]);
return 0;
}
//------------------------------
2 accumtriats.hpp
//-----------------------------
template< typename T >
class AccumulationTraits;
template<>
class AccumulationTraits< char >
{
public:
typedef int AccT;
static AccT zero()
{
return 0;
}
};
template<>
class AccumulationTraits< int >
{
public:
typedef long AccT;
static AccT zero()
{
return 0;
}
};
......
//--------------------------------
3 accum3.hpp
//----------------------------------

#include "accumtraits2.h"

template < typename T ,
typename AT = AccumulationTriats< T > >
class Accum
{
public:
static typename AT::AccT accum(T const* beg, T const* end )
{
typename AT::AccT total = AT::zero();
while( beg != end )
{
total += *beg;
++beg;
}

return total;
}
};

//------------------------
but when i try to complie this project, problems start to arise like fellowing:
"AccT" is not a member of AccumulationTraits
being stuck by this problem for days, i really get
frustrated. Doesn't VC6.0 surpport syntax like this?
template< typename T >
class AccumulationTraits;
template<>
class AccumulationTraits< char >
{
public:
typedef int AccT;
static AccT zero()
{
return 0;
}
};
well, i am all at the sea nowConfused | :confused:
i do define AccT in AccumulationTraits
GeneralRe: why triats declaration cannot work? Pin
prasad_som17-Oct-06 18:50
prasad_som17-Oct-06 18:50 
AnswerRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 3:48
Lim Bio Liong18-Oct-06 3:48 
GeneralRe: why triats declaration cannot work? Pin
Yaki_1518-Oct-06 15:00
Yaki_1518-Oct-06 15:00 
GeneralRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 16:04
Lim Bio Liong18-Oct-06 16:04 
GeneralRe: why triats declaration cannot work? Pin
Yaki_1518-Oct-06 15:29
Yaki_1518-Oct-06 15:29 
GeneralRe: why triats declaration cannot work? Pin
Lim Bio Liong18-Oct-06 16:01
Lim Bio Liong18-Oct-06 16:01 
QuestionI want to upload mp3 files using .net Pin
vijayprakash.g14-Oct-06 4:39
vijayprakash.g14-Oct-06 4:39 
AnswerRe: I want to upload mp3 files using .net Pin
Sceptic Mole20-Oct-06 0:41
Sceptic Mole20-Oct-06 0:41 
Questionhow to print the data listview to a bill Pin
ztkx12-Oct-06 19:28
ztkx12-Oct-06 19:28 
QuestionChanging the Classid for every rebuild. Pin
Eytukan12-Oct-06 3:09
Eytukan12-Oct-06 3:09 
AnswerRe: Changing the Classid for every rebuild. Pin
Mike Dimmick12-Oct-06 23:50
Mike Dimmick12-Oct-06 23:50 
GeneralRe: Changing the Classid for every rebuild. Pin
Eytukan12-Oct-06 23:58
Eytukan12-Oct-06 23:58 
QuestionListView problem Pin
invinJerry10-Oct-06 17:59
invinJerry10-Oct-06 17:59 
AnswerRe: ListView problem Pin
Jörgen Sigvardsson18-Oct-06 11:28
Jörgen Sigvardsson18-Oct-06 11:28 
QuestionHow can I get selected URL by right-clicked a hyperlink in Pocket IE? [modified] Pin
mobileconst9-Oct-06 23:33
mobileconst9-Oct-06 23:33 
Questionbackground drawing Pin
invinJerry9-Oct-06 19:22
invinJerry9-Oct-06 19:22 
QuestionHICON problem Pin
HakunaMatada9-Oct-06 1:03
HakunaMatada9-Oct-06 1:03 

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.