PDA

View Full Version : What am I doing wrong?!?!


pokejungle
October 25th, 2004, 01:02 PM
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:

#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:

Cherrim
October 25th, 2004, 03:23 PM
Mm... this goes in the computer forum, I believe. *moves it there*

pokejungle
October 26th, 2004, 01:28 PM
Great.....^^;


*is left hanging*


I NEED AN ANSWER! AHHHHHH

*goes crazy*

Geometric-sama
October 26th, 2004, 07:11 PM
default :cout should be default : cout for one thing; when you debug, where does it break?

pokejungle
November 1st, 2004, 07:22 PM
*Doesn't know*

How do you debug?

*sorry! Knows nothing!*

Geometric-sama
November 2nd, 2004, 03:45 PM
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.

pokejungle
November 2nd, 2004, 04:42 PM
It just says error, and if I keep viewing, nothing shows up. test.exe <--Name

Ummm....anything else wrong?

perthskies
November 3rd, 2004, 01:17 AM
A screenshot might help... I don't think there are many people here who are familiar with C++ (nor am I)...

Geometric-sama
November 3rd, 2004, 03:14 PM
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

Haruka
November 3rd, 2004, 04:53 PM
Visual Basic is much easier than c++..

*sighs*... I use Visual Basic to make media players and etc. ^_^

pokejungle
November 3rd, 2004, 05:31 PM
What's visual basic.....

[Can I have a good vb beginner's site URL?]

Haruka
November 3rd, 2004, 05:38 PM
Visual Basic is a another programing language, but easier than C++... =p..

pokejungle
November 3rd, 2004, 05:42 PM
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.*

Geometric-sama
November 3rd, 2004, 06:04 PM
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.

Kipkip
November 3rd, 2004, 06:34 PM
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 (http://python.org) . 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:

Geometric-sama
November 3rd, 2004, 06:58 PM
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.

pokejungle
November 4th, 2004, 02:49 PM
I'm going to take a look at VB.....I love Microsoft, so no problems there =D

Can you make games with VB though?

Haruka
November 4th, 2004, 07:17 PM
well, you don't need to buy vb or c++

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

it's free also.

pokejungle
November 6th, 2004, 08:05 AM
You kinda lost me Haruka...

But I know they're both free, I never had an questions about that =P

Geometric-sama
November 7th, 2004, 04:15 PM
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...