Click here to Skip to main content
15,921,212 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralCompile error Pin
zsombor9-Feb-05 6:39
zsombor9-Feb-05 6:39 
GeneralRe: Compile error Pin
Stuart Dootson9-Feb-05 20:38
professionalStuart Dootson9-Feb-05 20:38 
QuestionWhat overloaded member function called in if(iterator) Pin
DevendraC8-Feb-05 0:41
DevendraC8-Feb-05 0:41 
AnswerRe: What overloaded member function called in if(iterator) Pin
Joaquín M López Muñoz8-Feb-05 5:22
Joaquín M López Muñoz8-Feb-05 5:22 
GeneralRe: What overloaded member function called in if(iterator) Pin
DevendraC8-Feb-05 17:33
DevendraC8-Feb-05 17:33 
GeneralRe: What overloaded member function called in if(iterator) Pin
guypremont9-Feb-05 3:04
guypremont9-Feb-05 3:04 
GeneralRe: What overloaded member function called in if(iterator) Pin
Michael Dunn10-Feb-05 10:27
sitebuilderMichael Dunn10-Feb-05 10:27 
Generalusing cout in template argument... Pin
Malcolm Smart7-Feb-05 22:23
Malcolm Smart7-Feb-05 22:23 
Hi
I want to be able to dump a map out to any stream, ie cout, fstream, or stream into another class (the other class has the << overloaded) but I can't even pass cout into the template. I've cut the code back to the following....

typedef map<string , string> myMAP;

class MyClass
{
private:
	myMAP somedata;
public:
	void LoadSomeData(T &t) {//load map here};
	template <typename T>
	void DumpSomeData(T &t);
};


template <typename T>
void MyClass::DumpSomeData(T &t)
{
	myMAP::const_iterator iter(somedata.begin());

	while (iter != somedata.end())
		{
		t << "#" << iter->first << "#" << iter->second << endl;
		iter++;
		}
}

and to call it I use...
MyClass LoadAndDump;
LoadAndDump.LoadSomeData();
LoadAndDump.DumpSomeData(cout); <-- compiler errors....
//also tried
//LoadAndDump.DumpSomeData<std::basic_ostream<char,struct std::char_traits<char> > >(&cout);


It won't compile and gives

error C2893: Failed to specialize function template 'void __thiscall MyClass::DumpSomeData(T &)'<br />
        With the following template arguments:<br />
        'class std::basic_ostream<char,struct std::char_traits<char> > *'

Any help much appreciated.

Regards

Angel



*********************************************
The sooner you fall behind, the longer you have to catch up.
GeneralRe: using cout in template argument... Pin
Joaquín M López Muñoz8-Feb-05 5:35
Joaquín M López Muñoz8-Feb-05 5:35 
GeneralRe: using cout in template argument... Pin
Malcolm Smart8-Feb-05 21:44
Malcolm Smart8-Feb-05 21:44 
GeneralControl's window not ready even in FinalConstruct() Pin
greekgoddj7-Feb-05 5:21
greekgoddj7-Feb-05 5:21 
GeneralRe: Control's window not ready even in FinalConstruct() Pin
Michael Dunn7-Feb-05 7:02
sitebuilderMichael Dunn7-Feb-05 7:02 
GeneralRe: Control's window not ready even in FinalConstruct() Pin
Jörgen Sigvardsson7-Feb-05 8:58
Jörgen Sigvardsson7-Feb-05 8:58 
GeneralRe: Control's window not ready even in FinalConstruct() Pin
greekgoddj9-Feb-05 5:42
greekgoddj9-Feb-05 5:42 
GeneralRe: Control's window not ready even in FinalConstruct() Pin
Anonymous17-Feb-05 3:40
Anonymous17-Feb-05 3:40 
Questionhow to add new file to vss Pin
JabraJabra6-Feb-05 5:42
JabraJabra6-Feb-05 5:42 
AnswerRe: how to add new file to vss Pin
Igor Vigdorchik6-Feb-05 12:38
Igor Vigdorchik6-Feb-05 12:38 
GeneralRe: how to add new file to vss Pin
JabraJabra9-Feb-05 5:06
JabraJabra9-Feb-05 5:06 
GeneralArrays in VBA Pin
speedcat 4455-Feb-05 10:37
speedcat 4455-Feb-05 10:37 
GeneralWTL Linker error Pin
Franz Klein3-Feb-05 23:51
Franz Klein3-Feb-05 23:51 
QuestionCreating a CEdit in ATL ActiveX control with MFC Support? Pin
greekgoddj3-Feb-05 22:42
greekgoddj3-Feb-05 22:42 
AnswerRe: Creating a CEdit in ATL ActiveX control with MFC Support? Pin
greekgoddj7-Feb-05 0:06
greekgoddj7-Feb-05 0:06 
GeneralRe: Creating a CEdit in ATL ActiveX control with MFC Support? Pin
sh1it5058-Sep-10 3:24
sh1it5058-Sep-10 3:24 
GeneralATL for Ole Db Pin
lisoft3-Feb-05 15:28
lisoft3-Feb-05 15:28 
GeneralRe: ATL for Ole Db Pin
gauravjain4-Mar-05 10:43
gauravjain4-Mar-05 10:43 

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.