Hi

> Yes, I do realise that practice will improve how it looks, but just 
on a
> purely "first impressions" basis, since it means adding extra words 
to a
> normal declaration it can get rather wordy, and the angle brackets,
> especially when nested, are hard to follow (especially since they are 
also
> used for less than / greater than, and bit shifts).

Fair enough.

> I actually used a template once, successfully - the code ended up 
being
> rewritten in the end without them, but I did get them working - I 
actually
> had a good use for it!

That's a good start.

> > How else would you do it? :-)
> 
> Call one in InitInstance() and the other in ExitInstance() {:v)

Ah! We're back to MFC I see. :-D

I try not to do MFC you see. :-)

I'd declare an instance of COMInit inside main.

> > I wouldn't do it quite the same way as Ehsan, unless of course the
> > above is a class dcalred and defined local to main?
> 
> I assumed it was used as a global object? I must admit I've never 
declared
> classes with that extra bit, but doesn't g_init become a global 
instance of
> the COMInit class? 

Yes.

> There's just so much to the C++ language, so many ways of
> doing things, it's mind-boggling {:v)

It's wonderful! 

>  ~They're messing with your head Jason, ignore them!~
> *plods off to his VERY basic MFC coding*

Lol!

Regards
Paul

Paul Grenyer
Email: [EMAIL PROTECTED]
Web: http://www.paulgrenyer.co.uk

Have you met Aeryn: http://www.paulgrenyer.co.uk/aeryn/?
Version 0.3.0 beta now available for download.




Reply via email to