I am a total n00b at C++

This is a discussion on I am a total n00b at C++ within the C++ Programming forums, part of the General Programming Boards category; I know nothing about C++ ,i know Visual Basics, if that is any help here. Can anybody give me some ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    7

    I am a total n00b at C++

    I know nothing about C++ ,i know Visual Basics, if that is any help here. Can anybody give me some pointers on where to start and possibly some tutorials? (i know there are some on this site, but if any of you know some other really good ones, it would be appreciated). Any help would be nice .

  2. #2
    Unregistered
    Guest

  3. #3
    Registered User xlnk's Avatar
    Join Date
    Mar 2002
    Posts
    186
    the best things in life are simple.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    7
    I don't want to sound like an idiot but.... like I said, I am a n00b. What is a header file? What are their uses? How do I make one? I keep seeing isostream.h in the tutorials, but I get errors about the file not being found, is that file supposed to be on my comp already or do I have to make it? Any help on this would be greatly appreciated....

    Visual Basic was so much simpler....

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    what compiler do you use??
    Is it a C compiler or a C++ compiler?

    C++ Compilers should already have the iostream.h file in the DIR\Includes directory,

    if you have C++ compiler and its not showing, make sure u include it like this:

    #include <iostream.h>

    NOT

    #include "iostream.h"

    hope that helped
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  6. #6
    Registered User
    Join Date
    May 2002
    Posts
    7
    I use Microsoft Visual Studio 6.0 Enterprise Edition, which includes Microsoft Visual C++ 6.0

    Code:
    #include <isostream.h>
    
    int main ()
    {
      cout << "Hello! This is my first C++ Program!";
      return 0;
    
    }
    thats what i use, do i dont understand why the file isn't there if you said it should be.... Please i am lost here....

  7. #7
    Registered User
    Join Date
    May 2002
    Posts
    4
    That should be iostream, not isostream.

  8. #8
    Registered User
    Join Date
    May 2002
    Posts
    317
    was the isostream a typo just here or is tht how you spelled it in your program. Its iostream

  9. #9
    Registered User
    Join Date
    May 2002
    Posts
    7
    hahahaha, i feel like a dumbass. LOL. just a simple typo, oh well, i'll take this advantage to ask a few more questions. what are header files used for?

  10. #10
    Registered User
    Join Date
    May 2002
    Posts
    4
    They provide functions and consants and the like for use in your program.

    For example, math.h provides constants like Pi, and functions like square root and the trig functions.

  11. #11
    Registered User
    Join Date
    May 2002
    Posts
    7
    how do you know which ones contain the functions? also, can you get more than what originally came with the compiler?

  12. #12
    Registered User
    Join Date
    May 2002
    Posts
    317
    The bnest way is to open up the header files and take a look through them.

  13. #13
    Registered User
    Join Date
    May 2002
    Posts
    7
    ok, thanks guys. I think I will be visiting this board more often. If I need anymore help, I'll be back to ask for sure.

  14. #14
    Registered User
    Join Date
    Apr 2002
    Posts
    362
    Tur13o,

    Header files contain a collection of "library" files (functions).

    For example, sqrt() is a library (.lib) function contained in the header file <cmath>.

    When the compiler sees a preprocessor directive such as #include <cmath>, those files (functions) are added to your code.

    (Yes, all of them!)

    When you elect to access a particular pre-defined function, the compiler looks to see if the appropriate header file has been "included". If it has, you're "golden". If not, you score a compiler error.

    That is, you've attempted to access a function that's not part of your code.

    Not an elegant explanation, but I hope it helps.

    "When the only tool you own is a hammer, every problem begins to resemble a nail." Abraham Maslow

  15. #15
    Registered User
    Join Date
    May 2002
    Posts
    7
    helps alot. thanks :-D

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with day of the week program
    By Punkakitty in forum C++ Programming
    Replies: 10
    Last Post: 01-14-2009, 06:55 PM
  2. Replies: 8
    Last Post: 11-03-2008, 09:48 PM
  3. long problem
    By loko in forum C Programming
    Replies: 28
    Last Post: 07-22-2005, 10:38 AM
  4. Loops
    By Dt7 in forum C++ Programming
    Replies: 3
    Last Post: 10-23-2004, 07:11 PM
  5. Replies: 4
    Last Post: 04-22-2003, 01:52 PM

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