View Single Post
Old Jul 10th, 2005, 7:12 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Cout is a C++ stream buffer. It's very similar to the C streams (like stdin, stdout) and can, actually, be tied to them, but it's not a really robust thing to do. Both those types of streams are language features; they only associate with a particular platform like Windows or Unix via dependent code provided by the compiler for a particular platform. Printf, for instance, is not a Win32 thing either. Those things, in Windows, get to the hardware through the Win32 API, the console portion of it. In many instances the C++ I/O thangys are classes which wrap the C-style I/O. The approach contributes to their robustness at the cost of additional code footprint. In some cases, though, the additional capabilities are nice, indeed, and can actually result in faster operation if investigated thoroughly and used properly. I recommend you move to C++ despite any costs in actual performance. Investigate the STL for vectors, deques, and maps. You'll have a much easier time doing things like you're trying to do. Your production will be dramatically greater than for C, alone. Of course, when one needs cutting edge, one drops to whatever level is necessary to provide it, but that is not a normal goal for most applications. The goal is to get there rapidly with code that works definitively and correctly.

You should post in the C++ forum, since that's what you're writing. The C# thing confused the hell out of me; I didn't know why in the world you were trying to use those items in a C# environment. There is still a LOT of C++ native code information available on MSDN, it's just harder to find since they've gone so NET-centric. As far as I can tell, all the old stuff for VC++ 6.0 is still there, although I have it all on CDs from ages ago. You might want to download VC++ 2005 beta, which is free, just to get the documentation. I actually like it as an IDE, although I have to work to avoid the NET/managed code it wants to push on me and go for native code. I sometimes use it in combination with VC 6.0, which I use to do the visual layout of dialog boxes and such. I have Borland Builder 6, but it's not free (except for a limited trial). I have Dev-C++ too, and it's very good for a freebie, but the debug capabilities aren't quite as good as MS's.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote