On 6/2/2017 3:53 PM, bob by wrote: > On 2017-06-02 16:23 GMT+04:00 LRN wrote: >> On 6/2/2017 2:47 PM, bob by wrote: >>> Can somebody here write a replacement for the standard cout, that will be >>> able to print strings and integers, and internally will just redirect to >>> puts and itoa? I'm only starting with C++, I'm not sure how to do it. >> >> I feel compelled to cite my own first experience with C++. Specifically, i >> would like to mention that at the time i did not understand the difference >> between C and C++. It took me a while to understand the difference and >> realize >> that the programs i was writing were really just C programs, even though i >> was >> compiling them with a C++ compiler. I stopped writing in C++ shortly >> afterwards. >> >> I remembered that because you've mentioned cout and printf in the same >> sentence. >> > > Do you use datatypes like linked lists or trees or hashmaps? Can you share > some libraries or code to work with them? > > I'm trying to learn C++ just because a lot of code I see is written in C++. > Pretty much just in case.
glib[1] is the easiest for me to name. In my experience, large-ish C projects tend to include their own (developed in-house or just copy-pasted from somewhere) implementations of linked lists or trees when needed. Or use other utility libraries (google for "C utility library") that complement the C standard library, which is rather bare by itself. If you want, you can google for "C vs C++". Also - look for articles on pros and cons of object-oriented programming in general, and C++ (as an OOP language) in particular. That might help you understand the current situation around C++ better. [1] https://en.wikipedia.org/wiki/GLib -- O< ascii ribbon - stop html email! - www.asciiribbon.org
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public