Click here to Skip to main content
15,915,328 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Generalsync. probelm for ATL Pin
Prakash Sonani7-Jun-05 5:18
Prakash Sonani7-Jun-05 5:18 
GeneralRe: sync. probelm for ATL Pin
Anonymous11-Jun-05 11:50
Anonymous11-Jun-05 11:50 
GeneralSTDMETHOD Pin
Anand for every one5-Jun-05 21:58
Anand for every one5-Jun-05 21:58 
GeneralRe: STDMETHOD Pin
Anonymous5-Jun-05 22:17
Anonymous5-Jun-05 22:17 
GeneralRe: STDMETHOD Pin
Michael Dunn6-Jun-05 0:49
sitebuilderMichael Dunn6-Jun-05 0:49 
GeneralATL File Dialog Pin
AndyNugent3-Jun-05 1:12
AndyNugent3-Jun-05 1:12 
GeneralRe: ATL File Dialog Pin
Stuart Dootson3-Jun-05 3:38
professionalStuart Dootson3-Jun-05 3:38 
GeneralPassing std::endl to stream class Pin
Malcolm Smart2-Jun-05 0:10
Malcolm Smart2-Jun-05 0:10 
Hi
I have the following
class MyClass//cut down considerably
{
private:
   std::ofstream out;
public:
   MyClass() {out.open("C:\\test.txt" , std::ios::out);}
   template <typename T> MyClass& operator<<(const T& t)
      {
	out << t;
	return *this;
      }
};


and it works well...
MyClass myinstance;
myinstance << "Hello " << 2.4;


except...the logical way for a new line is std::endl so...

myinstance << "Hello" << std::endl;


but this throws a compiler error of

<br />
'class MyClass &__thiscall MyClass::operator <<(const T &)' : cannot use function template 'class std::basic_ostream<_Elem,_Traits> &__cdecl std::endl(class std::basic_ostream<_Elem,_Traits> &)' as a function argument<br />


Do I have to implement my own std::endl? Basically, I'm stuck...

Any info on this, much appreciated.

Cheers

Angel.




******************************************************
I once bought a book called 'Learn to read in 21 days'
Nigel Spoon - 1998
GeneralRe: Passing std::endl to stream class Pin
Christian Graus2-Jun-05 10:22
protectorChristian Graus2-Jun-05 10:22 
GeneralRe: Passing std::endl to stream class Pin
Malcolm Smart3-Jun-05 23:07
Malcolm Smart3-Jun-05 23:07 
GeneralRe: Passing std::endl to stream class Pin
Michael Dunn5-Jun-05 18:18
sitebuilderMichael Dunn5-Jun-05 18:18 
GeneralRe: Passing std::endl to stream class Pin
Christian Graus5-Jun-05 18:30
protectorChristian Graus5-Jun-05 18:30 
GeneralCreate an ActiveX Control in an ActiveXControl during runtime Pin
tom123933531-May-05 9:51
tom123933531-May-05 9:51 
GeneralDamaged ActiveX Pin
tonalites31-May-05 2:19
tonalites31-May-05 2:19 
Generaloledb in multithread Pin
HongJu.Cao31-May-05 0:36
HongJu.Cao31-May-05 0:36 
GeneralWeb Service Exceptions at run time Pin
skrishnasarma29-May-05 22:28
skrishnasarma29-May-05 22:28 
GeneralAlternate for BEGIN_DISPATCH_MESSAGE in wtl Pin
saravananvv24-May-05 7:59
saravananvv24-May-05 7:59 
QuestionHow to convet GetIDispatch(FALSE) to atl Pin
saravananvv24-May-05 1:05
saravananvv24-May-05 1:05 
GeneralOutgoing IDispatch interface Pin
preethamr23-May-05 22:12
preethamr23-May-05 22:12 
QuestionHow to Connect to database in ntservice Pin
Yu_Matrix22-May-05 22:22
Yu_Matrix22-May-05 22:22 
AnswerRe: How to Connect to database in ntservice Pin
toxcct23-May-05 3:43
toxcct23-May-05 3:43 
AnswerRe: How to Connect to database in ntservice Pin
Sergey Solozhentsev30-May-05 5:30
Sergey Solozhentsev30-May-05 5:30 
Generalabout outlook addin Pin
Member 198215421-May-05 0:53
Member 198215421-May-05 0:53 
GeneralHELP!!! using DISTINCT keyword causes error 0x80040E21 Pin
oyinbogo19-May-05 11:43
oyinbogo19-May-05 11:43 
GeneralError registering window class Pin
Fantmx19-May-05 10:15
Fantmx19-May-05 10:15 

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.