a couple of my F.A.Q. (please read)

This is a discussion on a couple of my F.A.Q. (please read) within the C++ Programming forums, part of the General Programming Boards category; I have a couple of quetions that i always wondered about. You posters seem nice and I was wondering if ...

  1. #1
    Registered User GrNxxDaY's Avatar
    Join Date
    Jul 2002
    Posts
    140

    a couple of my F.A.Q. (please read)

    I have a couple of quetions that i always wondered about. You posters seem nice and I was wondering if you could answer them.

    1)
    My C++ book uses #include <iostream>
    While others use #include <iostream.h>

    what is the difference if the .h is or isn't there?

    2)
    Is there a website where I can read about all of the most common libraries and what they do and common functions they hold with examples?
    Like, i would like to know the common <windows.h> functions that it has.

    3)
    Do i put the library files in the same file as my *.cpp source-code?



    that's it. thanks for reading =))

  2. #2
    Registered User
    Join Date
    Jun 2002
    Posts
    106
    #include <iostream> -->new style
    #include <iostream.h>-->old style

    nothing changes take one and use it
    (.h means that it is a hearder file)

    2-)most used functions are covered at this web site go for it

    3-)do not touch the .h files they are maintaned by the compiler
    C++ Makes you Feel Better

    "Gravity connot be held reponsible for people falling in love"--Albert Einstein

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    317
    2) check out MSDN, it is the begin all and end all

    3) Do you mean where you include them? Or are you planning on making some?

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    Originally posted by onurak
    #include <iostream> -->new style
    #include <iostream.h>-->old style
    This is the way I understand it also, but the non-.h version uses the namespace std. I think I remember not having to do any std stuff when using <iostream.h>

    Is that right people? I've been Windows coding for so long I don't remember my console stuff

  5. #5
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Yep.

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >I think I remember not having to do any std stuff when using <iostream.h>
    Old C++ didn't support namespaces, they are a relatively new addition.

    >what is the difference if the .h is or isn't there?
    Another note should be that the old style is deprecated and support for it may be removed from the standard in the near future.

    >Do i put the library files in the same file as my *.cpp source-code?
    It depends on what you mean by library files.

    -Prelude
    My best code is written with the delete key.

  7. #7
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    By library do you mean a library of commonly used functions that me or someone i work with has put together? Or do you library like a library file (.lib)? I'll assume you mean the first one. I used to do that but found that is better practice not to. You should just make another include directory for your own stuff.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Weird read input or bad printf output?
    By ChaoticMachiner in forum C Programming
    Replies: 3
    Last Post: 05-04-2008, 03:40 PM
  2. I am lost on how to read from file and output to file?
    By vicvic2477 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2005, 10:52 AM
  3. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM
  4. Read Array pro!!Plz help!!
    By Supra in forum C Programming
    Replies: 2
    Last Post: 03-04-2002, 02:49 PM
  5. Help! Can't read decimal number
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 09-07-2001, 02:09 AM

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