Thread: About string and stlib

  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
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    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.

  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, 01:24 AM
  4. Replies: 5
    Last Post: 05-09-2010, 10:58 AM
  5. Replies: 1
    Last Post: 10-31-2005, 11:36 AM