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:
Anonymous2007-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:
Anonymous2007-11-21 22:54
OH I FRGT IMA SHTHEAD 2
Name:
Anonymous2007-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:
Anonymous2007-11-22 9:58
BUUT I WNT 2 LRN GAMST MKE LEIK HALO AND HALF LIFE
Name:
Anonymous2007-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.
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:
Anonymous2007-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.