 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Fri Mar 14, 2008 7:51 am Post subject: |
|
|
| BasketCase wrote: | | slovach wrote: | | http://cplusplus.com/ |
Already there
Man this is so confusing. None of the commands even relate to what they do
cout = print message? wait what?
it doesnt explain the #include that well, like what it actually does and in what situations we'd use which include, etc
doesnt explain the int in "int main ()"
Bah, this is gonna take forever  |
int main() is the main function inside it you can declare/use as many functions and shit you want, for me atleast C++ is very simple..
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Mar 14, 2008 1:47 pm Post subject: |
|
|
| skyllakarean wrote: | | int main() is the main function inside it you can declare/use as many functions and shit you want, for me atleast C++ is very simple.. |
Just stop. Hurry up and get banned.
int = integer, you're returning something (usually 0 in this case, though 0 doesn't always mean there was no error.) to say that everything went cool.
|
|
| Back to top |
|
 |
malfunction Grandmaster Cheater Supreme
Reputation: 0
Joined: 30 Jan 2007 Posts: 1015 Location: http://www.behindthecorner.com/
|
Posted: Sat Mar 15, 2008 5:42 am Post subject: |
|
|
| Xenophobe wrote: | | AndrewMan wrote: | | slovach wrote: | | AndrewMan wrote: | I do regret starting to learn VB, but in some ways its good. Good for trainers, good for making simple applications, and easy to understand.
C++, on the otherhand, requires you actually to memorize. VB is sort of like writing a book. C++ is actually "LEARNING another language". Requires you to memorize, and will take a while.
Example:
To say "hello world" in Visual Basic its this:
| Code: |
MsgBox("Hello World") |
In C++ it is this:
| Code: | #include "stdafx.h"
#include <iostream>
#include <conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
std::cout << "Hello World!";
std::cout << "Press any key to exit... ";
getch();
return 0;
}
|
Of course I know shit about C++, and wont learn till the summer when I get more time...  |
This is wrong.
cout is not a MessageBox. A MessageBox is a MessageBox.
MessageBox(NULL, "Hi I'm a message.", "hi!", MB_OK); |
Than XenoPhobe is wrong because I got it from him.
I don't know anything about C++ yet. In the summer i'll start learning it. |
I didn't tell you that was a messagebox.  |
Yeah where the fuck did the messagebox come from? but even better for the hello world program would be:
| Code: | #include <iostream>
using namespace std;
int main()
{
cout <<"Hello World" << endl;
return 0;
} |
using namespace std; is much better than writing std:: everysingle time you use cout/cin w/e.
| slovach wrote: | | skyllakarean wrote: | | int main() is the main function inside it you can declare/use as many functions and shit you want, for me atleast C++ is very simple.. |
Just stop. Hurry up and get banned.
int = integer, you're returning something (usually 0 in this case, though 0 doesn't always mean there was no error.) to say that everything went cool. |
I know int = integer im not a retard, but int main() is the main function of the program and is executed first, proove me wrong.
| Quote: | | This line corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C++ program. For that same reason, it is essential that all C++ programs have a main function. |
_________________
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sat Mar 15, 2008 7:06 am Post subject: |
|
|
@AndrewMan:
No no no,
in VB, you would say Hello World
| Code: |
MsgBox("Hello World")
|
in C++
| Code: |
cout << "Hello World";
|
or, as Slovach pointed out
| Code: |
MessageBox(NULL, "Hello world", "Hello", MB_OK);
|
It might be more complicated, but that's the best part about it.
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Mar 15, 2008 9:57 am Post subject: |
|
|
| skyllakarean wrote: | | using namespace std; is much better than writing std:: everysingle time you use cout/cin w/e. |
No? There is nothing better about writing that. The only thing you gain is being more lazy and having it done for you.
_________________
- Retired. |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Mar 15, 2008 10:15 am Post subject: |
|
|
| Quote: | I know int = integer im not a retard, but int main() is the main function of the program and is executed first, proove me wrong.
Quote:
This line corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C++ program. For that same reason, it is essential that all C++ programs have a main function. |
you can use void main() all the same. You can use bool urahoe() all the same.
Int main means that the DEFAULT entry point (main in console apps unless specified in the build) returns a value that is an int. void main means no return and bool main means 1, 0 return value.
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|