Thread: Site tutorials

  1. #16
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    lol.......that was good people. It looked weird, but I thought Prelude was being serious. Good stuff people. Luckily you gave us the right answer let on, I could see myself arguing already...

    Me-"Damint it stands for sanctioned"
    someonelse-"You're wrong.......Why do you say that"
    Me-"Because Prelude said it that's why!"
    Last edited by incognito; 01-04-2004 at 08:56 PM.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #17
    Registered User
    Join Date
    Nov 2003
    Posts
    66
    Trust me, those tutorials are EXTREMELY out dated. I understand how you don't wanna spend money (yet) on programming, but here's a good suggestion: go to the library and get a book on C++. Don't get books that were printed back in the 19xx , cuz they are as old as da tutorials on this site. Then, if you know you're interested, start buying books. Good C++ books out there should give many examples on usage of the language and should be understandable even by dummies.Try <Ivor Horton's Beginning C++> if you like, cuz that's the one I read. One more thing, instead of using cin.get() , you can also use system("PAUSE") . It prompts the user to press any key before closing.

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello world." << endl;
        system("PAUSE");
        return 0;
    }
    An Unofficial Cristiano Ronaldo Website : Ronaldo 7

  3. #18
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    Originally posted by Cris987
    One more thing, instead of using cin.get() , you can also use system("PAUSE") . It prompts the user to press any key before closing.
    There are operating systems that do not have the PAUSE command, so I'd recommend not using system("PAUSE"); because of it's lack of portability. And cin.get()
    1) does basically the same thing
    2) doesn't rely on an expensive system call
    3) is already part of the compiler
    4) is fully portable to any C++ compiler
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  4. #19
    Registered User heat511's Avatar
    Join Date
    Dec 2001
    Posts
    169

    quick question sircrono6

    Originally posted by SirCrono6
    Code:
    std :: cout << "Hello World!";
    std :: cin.get();
    why is this better than
    Code:
    cout << "Hello World!";
    cin.get();
    "uh uh uh, you didn't say the magic word"
    -Jurassic Park

  5. #20
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >why is this better than
    If you don't make the names cin and cout visible, it's better because your way wouldn't compile. Otherwise it's a matter of style.
    My best code is written with the delete key.

  6. #21
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Some folks believe that you shouldn't "bring in" an entire namespace into the global namespace with "using namespace std;"

    I have not problems with bringing in the entire "std" namespace into an application - if you do end up with namespace collisions, the compiler will let you know.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  2. Got any tutorials or programs?? Send them to my web site!
    By robmil29 in forum C++ Programming
    Replies: 6
    Last Post: 09-27-2004, 11:38 AM
  3. Best way to organize tutorials
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 05-30-2004, 04:41 AM
  4. tutorials on site
    By BuRtAiNiAn FlY in forum C++ Programming
    Replies: 19
    Last Post: 07-08-2002, 06:37 PM