What am I doing wrong?!?!

  • 12,504
    Posts
    21
    Years
    • Seen Mar 13, 2022
    I'm not exactlysure if it goes here, but I'm sure PC's friendly mods will move it if I've erred....Anyway, on to the problem:

    Lately I've been working on C++ programming, but my first program I've typed up doesn't work for some reason....=/ Here it is:

    My Program said:
    #include <iostream>
    using namespace std;

    int main ()
    {
    char letter;

    cout << "Enter any 1-4 number: ";
    cin >> number

    switch(number)
    {
    case '1' : cout << "YOU'RE NUMBER 1! [Not that that means anything] =P\n"; break;
    case '2' : cout << "Who'd pick #2?? What were you thinking?!?!\n"; break;
    case '3' : cout << "You're smart. ^_- #3's awesome!\n"; break;
    case '4' : cout << "Donald Trump says, \"You're fired.\"\n"; break;
    default :cout << "Wow you're dumb! I said 1-4!\n"; break;

    }
    return 0;

    }

    It, by the way, is a very diluted version of a cootie catcher. Pic a number, get a smart alec response... :nervous:
     
    Mm... this goes in the computer forum, I believe. *moves it there*
     
    default :cout should be default : cout for one thing; when you debug, where does it break?
     
    Technically, I'm a VB programmer not a C++. When you run and test, you should be able to debug when an error comes up.
     
    It just says error, and if I keep viewing, nothing shows up. test.exe <--Name

    Ummm....anything else wrong?
     
    I really need to try the code myself to debug it, I don't have C++ on this computer but I may have it on my home computer if I look hard enough.... I think it's buried in there somewhere o_O
     
    Visual Basic is much easier than c++..

    *sighs*... I use Visual Basic to make media players and etc. ^_^
     
    Visual Basic is a another programing language, but easier than C++... =p..
     
    Oh....but probably not as useful XD

    I love C++ programming...I just don't get it! *Shakes his head at the irony of it all.*
     
    Visual Basic is powerful but simple, I've been using it since I was 10. It's Microsoft, but don't let that put you off. VB programs run only on Windows.
     
    Jedi_Amara said:
    Visual Basic is powerful but simple, I've been using it since I was 10. It's Microsoft, but don't let that put you off. VB programs run only on Windows.
    Anything that only works on Windows is evil.
    Do you have any experience in computer programming, pokejungle? If not, I heard a real good start on computer programing is Python . I've heard that it's easy to learn. I never tired it myself. I'm more of a web programmer. C++ is really hard to learn without any coputer programming knowledge. I tired to learn once and it was really hard. That's why I went to web programming :classic:
     
    There's a .NET open-source alternative being made, that's cross-platform. I can't remember what it is, but you can do a Google search.
     
    I'm going to take a look at VB.....I love Microsoft, so no problems there =D

    Can you make games with VB though?
     
    well, you don't need to buy vb or c++

    ^_^... use a open source .net like SharpDevelop. ^_^...

    it's free also.
     
    You kinda lost me Haruka...

    But I know they're both free, I never had an questions about that =P
     
    I need to look up the name of that open source .NET-equivalent framework... I don't think that one you mentioned was it, Lyssa...
     
    Back
    Top