What are the common libaries for C++?

Sharky Forums


Results 1 to 6 of 6

Thread: What are the common libaries for C++?

  1. #1
    Mako Shark Mancora's Avatar
    Join Date
    Jun 2001
    Location
    The other side of where the fishes swim
    Posts
    4,313

    What are the common libaries for C++?

    Ok im a new C++ student and im somewhat confused by the C++ libary choices i can make, i keep thinking of java where there was _one_ libary, or at least thats all i ever had to worry about.


    From what ive gathered...

    Standard C libary, contains functions like cout, cin, and string, is this libary cross platform? Would i be able to compile this on a windows machine and then run it on a *nix platform?

    Then there's the Microsoft Foundation Classes, MFC, which was made for programing for a windows interface by, as the name implies, microsoft.

    Then what does C++ use for .net? It would need to be another libary right?

    Then theres the windows API i believe, which is a more basic and lower level programming than the MFC?





    And theres another libary, Form, or Forms, which i believe is what c sharp uses for .net, is there another libary for C# that doesnt requre forms so you can run your C# program outside of a .net framework?

  2. #2
    Catfish gameboy1234's Avatar
    Join Date
    Aug 2002
    Posts
    238
    Yeah, no wonder you are confused. First, as a student, you need to learn to educate yourself. That means when you hear about a "standard" you need to actually find and read that standard.

    Now I don't have C++ standard myself, but the next best thing is The C++ Programming Language by Bjarne Stroustrup. It does have everything in the standard in that book, I believe.

    Briefly, the standard C library is just that, the *C* library. It's definately NOT cin and cout because those are objects, which C doesn't do. The whole C library is function calls like printf. You can find all of these function calls in headers like: <ctime>, <cstdlib>, <cassert>, <cerrno>, <cctype>, <cwctype>, <cstring>, <cwchar>, <cstdio>, <clocale> <cstddef>, <csignal>, etc. Notice the starts with a c theme?

    Cin and count and friends are defined in the standerd C++ library. You can find all of these classes defined in headers like: <iostream>, <utility>, <functional>, <memory>, <iterator>, <algorithm>, <exception>, <stdexcept>, <string>, <new>, <limits>, etc.

    Stroustrup spends over 200 pages on the standard library so I ain't gonna be able to explain it all to ya here. Go read the book.

    The standard template library is also part of the standard.

    Then you have things like MFC and .NET and stuff that I refer to as vendor proprietary crapola. You're on your own there, sorry. Go bug Microsoft.

  3. #3
    Mako Shark Mancora's Avatar
    Join Date
    Jun 2001
    Location
    The other side of where the fishes swim
    Posts
    4,313
    Originally posted by gameboy1234
    Yeah, no wonder you are confused. First, as a student, you need to learn to educate yourself. That means when you hear about a "standard" you need to actually find and read that standard.
    Almost all the stuff ive found has just talked about how to use X, not what X is. Ah well maybe im just natually slow and stupid.

  4. #4
    Reef Shark bocybo's Avatar
    Join Date
    Sep 2002
    Location
    Texas
    Posts
    280
    If you want to learn ALL about the c++ standard library, there is only 1 book to look at:

    The C++ Standard Library: A Tutorial and Reference by Nicolai Josuttis.

    It's easily the best on the subject.
    Reed's sister is sooo hot!

  5. #5
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    As for the Windows libraries, if you're going to be writing Windows code, just get Visual Studio. The only version MS sells anymore is VS.NET, but you could probalby find VS 6 C++ cheap on ebay or something. The help/documentation will tell you anything you really need to know about MFC or the Forms classes.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  6. #6
    Catfish gameboy1234's Avatar
    Join Date
    Aug 2002
    Posts
    238
    Originally posted by Mancora
    Almost all the stuff ive found has just talked about how to use X, not what X is. Ah well maybe im just natually slow and stupid.
    No no no. That's why many people don't learn. What I'm saying is, don't assume you are stupid. Assume that if you don't understand something, then it's because all those people trying to explain it aren't saying the right thing.

    In short, don't give up. Keep digging until you find the real answer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •