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

Pages: 1-

HIA GUYZ

Name: Anonymous 2007-11-21 22:44

HI GUYZ I JUT LEARNT MICOSFT VISRUAL BASIK++ AND WUZ WONDERUN WHY MEH PR0GrM WNT WORK:

sTART(NOT A vARIAEBL)
pRinTOUT(HElO WRLD)

}

WHY IT NO WRK BTW MEH CAPS LAOCK IS ON AN I DNT FEL LEIK TYPIN AGIAN OK JUST FIX IT LOL JK, THXX

Name: Anonymous 2007-11-21 22:45

OH I ALSO WNT 2 TRY'N MAEK A GAME IT WIL BE LIK HAF LIFE ONLY WIT SUM MOAR STUFF K THX

Name: Anonymous 2007-11-21 22:54

OH I FRGT IMA SHTHEAD 2

Name: Anonymous 2007-11-21 23:02

Hmm, have you learnt Visual Basic or C++? I think you're getting the two confused. Given the latter case, you seem to be getting the structure of the main function incorrect. In C++, all functions have a structure like:

<return-type> <function-name>(<arguments> | [<void>])
{
    // instructions
}

Variable declarations go like:
<arg-type> <variable-name>;
Eg. int foo;
to declare a machine word sized integer.

As way of example, here is the infamous ``hello world'' program:

#include <iostream>
using namespace std;
int main(void)
{
    cout << "Hello world" << endl;
    return 0;
}


Finally, I highly recommend these books for C++:
C++: How to Program, 5th Ed., by Dietel and Dietel
The Complete Reference C++, 4th Ed., by Herbert Shcildt
Data Structures in C++ Using the Standard Template Library, by Timothy Budd

Name: Anonymous 2007-11-22 9:58

BUUT I WNT 2 LRN GAMST MKE LEIK HALO AND HALF LIFE

Name: Anonymous 2007-11-22 20:25

>>4
That's somewhat disgusting. cout is lose. std is typically lose. Giving nice actual parameters for main() is a good idea, for form, but not mandatory.

#include <stdio.h>
int main(void){
    printf("\n\t\Hello, World!\n");
    return 0;
}

Also, stay the hell away from STL if you're just learning.

Name: Anonymous 2007-11-22 20:52

>>6
Only that's not C++, that's C.

Wait, what the fuck what am I doing replying to a troll thread.

Name: Anonymous 2007-11-22 21:00

>>7
I'm asking myself the same thing.

Name: Anonymous 2007-11-22 21:10

>>4
The Complete Reference C++, 4th Ed., by Herbert Shcildt
Herb Schildt is a fucking moron (you misspelled his name btw)

Name: Anonymous 2007-11-22 21:40

>>9
What qualifies him as a moron?

I'm not the OP, and I'm not defending Schildt. Just curious, is all.

Name: Anonymous 2007-11-22 22:06

>>10
you know, just googling found this
http://www.herbschildt.com/getting_started_with_CSharp.htm

the guy IS a moron, no questions.
To enter the program, you must use a text editor, not a word processor. Word processors typically store format information along with text. This format information will confuse the C# compiler.
Ok, so he assumes the reader is a moron. I'm cool with that. But let's keep reading!
Before you can run the program, you must compile it. Compilation translates the source code into a form that can be executed. In the case of C#, the output of the compiler is MSIL, which stands for Microsoft Intermediate Language. MSIL defines a set of portable instructions that are independent of any specific CPU. MSIL is executed by the Common Language Runtime (CLR). The CLR provides a just-in-time (JIT) compiler that translates MSIL into executable code when the program is run.
WTF you've just assumed the reader was a moron and now you're spewing shit about CLR and MSIL and JIT?

Name: Anonymous 2007-11-22 23:19

>>11
lulz. He seems to be the type that is more interested in making cash than actually doing something constructive with his code skills.

He states the obvious, but that doesn't make him a moron, necessarily.

Name: Anonymous 2007-11-22 23:32

>>12
He is not a moron, but he is a moran.

Name: Anonymous 2007-11-23 5:34

>>12
Truth. Many, perhaps most books about anything related to computing are about filling pages with crap to make money.

Name: Anonymous 2010-11-26 17:23

Name: Anonymous 2011-02-04 16:24

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