Like Tree2Likes
  • 2 Post By manasij7479

About string and stlib

This is a discussion on About string and stlib within the C++ Programming forums, part of the General Programming Boards category; Hi guys, When making a program, when do we use "#include<string.h>"? Before using string as a data type for a ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    96

    About string and stlib

    Hi guys,

    When making a program, when do we use "#include<string.h>"?

    Before using string as a data type for a variable do we have to use :

    #include<string.h>?




    Also why do we use "#include<stdlib.h>" in a program?

    Thanks

  2. #2
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,498
    string.h

    stdlib.h

    How To Ask Questions The Smart Way

    Btw, the std::string type is not in <string.h>, but in <string> .
    Last edited by manasij7479; 06-12-2012 at 02:32 AM.
    stahta01 and antred like this.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #3
    Registered User R41D3N's Avatar
    Join Date
    Mar 2012
    Location
    ...Beyond Infinity, Behind a KeyBoard...
    Posts
    29
    ^Adding to that, your <stdlib.h> will be <cstdlib> .

    <cstdlib>

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 22
    Last Post: 07-28-2011, 01:26 PM
  2. Replies: 7
    Last Post: 06-16-2011, 06:21 PM
  3. Replies: 12
    Last Post: 03-07-2011, 12:24 AM
  4. Replies: 5
    Last Post: 05-09-2010, 10:58 AM
  5. Replies: 1
    Last Post: 10-31-2005, 10:36 AM

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