Really quick silly question.

This is a discussion on Really quick silly question. within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Jozrael EDIT: On the topic of STL v MFC. So the...microsoft foundation library (?) has a better ...

  1. #31
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,888
    Quote Originally Posted by Jozrael View Post
    EDIT: On the topic of STL v MFC. So the...microsoft foundation library (?) has a better set of tools? Is it more widely used?
    As Daved says, it's a Microsoft-only library. It's a big framework with lots of classes, including GUI. I tend to use it for GUI and the rest of the classes simply because it's more tuned to how I like things. Everyone is different so there isn't any better or worse. They are different libraries with different purpose.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #32
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,750
    Code:
    #include <string>
    #include <algorithm>
    #include <iostream>
    #include <ostream>
    #include <cctype>
    
    int main ( )
    {
        const std::string test( "CAPS LOCK IS CRUISE CONTROL FOR COOL" );
        std::string lower( test );
        std::transform( test.begin(), test.end(), lower.begin(), ::tolower );
        std::cout << test << std::endl;
        std::cout << lower << std::endl;
    }

  3. #33
    The larch
    Join Date
    May 2006
    Posts
    3,573
    If you find case conversions hard (and need to do lots of string processing), downloading boost is an option. Most of it, including string algorithms, is headers only, so there are no installation difficulties.
    boost contains a number of nice string algorithms, for example for case conversion.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  4. #34
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,888
    Boost seems a big, very nice library overall, as well, but it seems large and it could be difficult to know exactly what's in it.
    It would be nice if the wiki pages could be updated with information about it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #35
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Aside from string::tolower, string::toupper. I think there is also no such function as string::equals_ignore_case?

    EDIT: I could not find an equalsIgnoreCase function in QString (Qt) class also!
    Last edited by manav; 04-04-2008 at 06:34 AM.

  6. #36
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,750
    But then operator == becomes case insensitive when you temporarily make both operands the same case beforehand anyway, like my example or a number of others demonstrates.

  7. #37
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Again, case insensitive string comparisons are available in boost

    As to it being large - naturally you won't need everything boost offers, and it does have quite well structured references (offline references come with the download if I'm not mistaken).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Very quick math question
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 10-27-2005, 12:05 AM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 04:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 05:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 12:04 PM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 06:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21