Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Console app, Hello World! Problem

Name: Anonymous 2006-07-05 19:44

Im just starting C++ but i have got stuck straight away!

I have:

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World!\n" << endl;
    return 0;
}


It works fine, but just as it appears, it closes..and in the tutorial it shows the console with: 'press any key to continue...' under 'Hello World!'. Please Help!

Name: Anonymous 2006-11-18 14:15

>>14

hahahahahaha, you think c is an easy language!!

Name: Anonymous 2006-11-18 14:18

>>37

thank you

Name: Anonymous 2006-11-18 15:31

>>41
C is not the best for starters but it IS reasonably easy, or at least it doesn't suck. It's one thing to be easy and another thing to be easy to do things with. It's not easy to do string manipulation and higher level stuff in C. But the language itself is easy; I'd say far easier (and smaller) than Python, and it should be, being a low-level language. If C were actually harder than a high-level language supporting good OO, first-class functions, closures, etc., C would be a piece of shit. And it isn't. BTW, that's why C++ IS a piece of shit.

Name: Anonymous 2006-11-18 15:43

>>43
So you are saying C++ sucks just because it is a little more complicated than C because it has has good OO, first-class functions, closures, etc.?

Yes, those added features do make it a little harder, but in the end, they make things easier.  It is really not a good idea to evaluate languages on what learning them is like, although it's hard to evaluate them any other way.

Name: Anonymous 2006-11-18 16:28

C++ does not have 'good OO, first-class functions, closures, etc.' It has bad OO and none of the rest.

Way to fail hard.

Name: Anonymous 2006-11-18 17:13

>>45
used all around the scientific and financial world, way to fail hard? I'm rather proud of it

Name: Anonymous 2006-11-18 17:22

You should judge a language based on what can be done with it.

Name: Anonymous 2006-11-18 17:28

>>44
So you are saying C++ sucks just because it is a little more complicated than C because it has has good OO, first-class functions, closures, etc.?
You fail, C++ has none of those.

Name: Ok 2006-11-18 18:29

Here is the C++ code:
#include <iostream.h>
int main() {
cout << "Hello World!\n" << end;
getchar(); // wait for the user to press enter
return 0;
}
Here is the C code:
#include <stdio.h>
int main() {
printf("Hello World!\n");
getchar();
return 0;
}

Name: Whoops 2006-11-18 18:30

lolz in the C++ code i used \n and << endl; together.. >_>

Name: Anonymous 2006-11-18 21:06

Here's the Python code:
print 'Hello World!'
raw_input()º

Name: Anonymous 2006-11-18 21:07

>>51
WTF happened to my raw_input()

Name: Anonymous 2006-11-19 6:30

>>46
No I was saying that YOU fail hard for demonstrating you don't know what you're talking about. Assuming you're >>44. (which you are because Anonymous Anonymous is Anoooonymous)

Name: Anonymous 2006-11-19 6:52

>>53
I work in C++ with scientists, I don't need to prove anything to myself as I see it every day with my own eyes. All my friends have the same experience as I do and I just need to look at the "serious" job offers (not the J2EE crap) to have a proof of what I live. Now stfu and come back once you have some real life experience (being 15 years old does not count)

Name: Anonymous 2006-11-19 8:38

>>54
Massive ownage.

Name: Anonymous 2006-11-19 17:28

>>53
Being old doesn't make you right, grandpa!

Name: Anonymous 2006-11-19 18:54

>>54
If you see closures every day while working with C++ then you're obviously using a completely different language than the C++ everyone else uses. That, or you don't know what a closure is.

Name: Anonymous 2006-11-21 15:43

>>57
where did you saw "closures" in my message, dipshit!

Name: Anonymous 2006-11-22 11:15

>>58
So you are saying C++ sucks just because it is a little more complicated than C because it has has good OO, first-class functions, closures, etc.?

dipshit

Name: Anonymous 2006-11-22 12:36

>>59
C++? Closures? Are you high?

Name: Anonymous 2006-11-22 13:44

>>59
I didn't say that, dipshit. It's called "being anonymous."

Name: Anonymous 2006-11-22 14:47

Will you guys stop picking on C++ just because it has closures, functional programming is a good thing, you know.

Name: Anonymous 2006-11-23 4:54

Anonymous is talking to himself

Name: Anonymous 2006-11-23 6:19

404: Reading comprehension not found on this server.

Name: Anonymous 2006-11-23 10:58

>>62
Troll

Name: Anonymous 2006-11-26 12:29

#include <stdio.h>
char *msg = "Hello World\n";

void message(char *p) {
printf("%s", p);
}
main() {
message(msg);
return 0;
}

Name: Anonymous 2006-11-26 14:17

>>66

Wow, thats needlessly complicated.

Maybe next time you could use a structure of floats and do some casting. Whole of /prog/ would respect you, honest.

Name: Anonymous 2006-11-26 14:48

Great cuz i needed /prog/'s respect..
You fool it was complex on purpose.

Name: Anonymous 2006-11-26 15:01

#include <stdio.h>

void message(int msg,int a,int b,int c,int d,int e,int f,int g,int o,int l) {
printf("%c", (char)msg);
msg+=a;
printf("%c", (char)msg);
msg+=b;
printf("%c", (char)msg);
msg+=c;
printf("%c", (char)msg);
msg-=d;
printf("%c", (char)msg);
msg+=e;
printf("%c", (char)msg);
msg+=f;
printf("%c", (char)msg);
msg+=g;
printf("%c", (char)msg);
msg-=o;
printf("%c", (char)msg);
msg-=l;
printf("%c", (char)msg);
}
main() {
    message(72,29,7,3,79,55,24,3,6,8);
}

Name: Anonymous 2009-01-14 14:01

FIOC

Name: Anonymous 2010-06-07 6:53

Hi, I can spam /prog/ too, you faggot.

Also, smoke weed everyday.

Name: Anonymous 2010-06-26 9:59

ur gay

Name: Anonymous 2011-02-03 5:49

Name: Sgt.Kabu㗖kiman訹䰉 2012-05-28 19:22

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List