Thread: Language

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    5

    Language

    Ok im new to C++
    im learning fairly slow....
    all i have down really is that if you put // you can leave a comment
    is there a list of codes or something?
    i dont understand i have seen microsofts videos on the program but
    it is very confusing.
    help?

  2. #2
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Try the tutorials on this site. They're very handy.
    Code:
    #include <iostream>
    int main()
    {
       std::cout << "You'll get the hang of it. Just don't expect it to be quick." << std::endl;
       std::cin.get();
    }
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    5
    Thanks I built it too just to show you i can learn fast!
    Pic below

  4. #4
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Code:
    #include<iostream>
    #include <string>
    int main()
    {
       std::cout << "Now make the program say \"What!?\"" << std::endl;
       std::string response;
       std::getline(std::cin, response);
       if(response == "Fine, I will!")
            std::cout << "What!?" << std::endl;
       else if(response == "I don't think so.")
            std::cout << "Fine: figure it out yourself." << std::endl;
       else
            std::cout << "Huh?" << std::endl;
       //Does the console just blink for a second and then disappear?
       //What can you add from the first program to fix that? What does the FAQ say?
    }
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You do not need to add anything; you need to use a proper IDE, a debugger or the command prompt (which the FAQ unfortunately fails to explain).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  5. Language Script..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-30-2003, 06:48 AM