| View previous topic :: View next topic |
| Author |
Message |
Hackerdevelopment Advanced Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 55
|
Posted: Sat Oct 20, 2007 7:56 pm Post subject: |
|
|
| r u sure? |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Oct 21, 2007 12:24 am Post subject: |
|
|
| Symbol wrote: | | use #include <stdio.h> and #inclue <conio.h> and then instead of return 0 use getch(); and instead int main() use void main(). |
Your main function should always return a value. It's not like 'against the rules' or anything of coding, but it's the suggested and preferred method. |
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Sun Oct 21, 2007 2:48 am Post subject: |
|
|
| oib111 wrote: | | Pretty sure symbol and kasper = delphi peplz, so don't listen to their C++ nonsense. |
and what I said is true ? *guess yes * |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Oct 21, 2007 5:02 am Post subject: |
|
|
ohh...and Mr.oib111 is C++ pro.  |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Oct 21, 2007 5:19 am Post subject: |
|
|
| oib111 wrote: | | Pretty sure symbol and kasper = delphi peplz, so don't listen to their C++ nonsense. |
From the 2 lines I know in C++, thats what I learned and it worked for me... O_O
I know C# and delphi, C# uses diffrent libaries or because its visual... I learned C++ like 2 hours and they told me to add conio.h and then I can getch();
Was I wrong? |
|
| Back to top |
|
 |
Qvazzler Advanced Cheater
Reputation: 0
Joined: 02 Jan 2007 Posts: 68
|
Posted: Sun Oct 21, 2007 5:32 am Post subject: |
|
|
My personal favorite sofar to this problem is using the _getch(); function inside the <conio.h> library.  |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Sun Oct 21, 2007 5:46 am Post subject: |
|
|
| Qvazzler wrote: | My personal favorite sofar to this problem is using the _getch(); function inside the <conio.h> library.  |
Exacly what I SAID! why do they complain?  |
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Sun Oct 21, 2007 7:25 am Post subject: |
|
|
| Symbol wrote: | | Qvazzler wrote: | My personal favorite sofar to this problem is using the _getch(); function inside the <conio.h> library.  |
Exacly what I SAID! why do they complain?  |
Here's a hint : | Quote: | | instead of return 0 use getch(); and instead int main() use void main(). |
It has to do with two (2) things you said. _________________
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sun Oct 21, 2007 7:58 am Post subject: |
|
|
if your getting errors, you can debug using a return value of your main. Always return a value. and you use return 0 so you know that everything went fine when 0 is spat out at the debugger. _________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Oct 21, 2007 9:41 am Post subject: |
|
|
| Kaspersky wrote: | ohh...and Mr.oib111 is C++ pro.  |
Haha, did I sa y I was?
| Symbol wrote: | | oib111 wrote: | | Pretty sure symbol and kasper = delphi peplz, so don't listen to their C++ nonsense. |
From the 2 lines I know in C++, thats what I learned and it worked for me... O_O
I know C# and delphi, C# uses diffrent libaries or because its visual... I learned C++ like 2 hours and they told me to add conio.h and then I can getch();
Was I wrong? |
Well, I mean you can use that to accomplish the same thing, but we don't want to completely change his code. And I don't like how you have to use two libraries to accomplish a thing you could have done with one. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Hackerdevelopment Advanced Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 55
|
Posted: Sun Oct 21, 2007 2:49 pm Post subject: |
|
|
| I understand now evry1. Thanks. |
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Sun Oct 21, 2007 3:05 pm Post subject: |
|
|
| Hackerdevelopment wrote: | | I understand now evry1. Thanks. |
I think we all confused him lol |
|
| Back to top |
|
 |
happydud3 Advanced Cheater
Reputation: 0
Joined: 07 Dec 2006 Posts: 86
|
Posted: Sun Oct 21, 2007 3:26 pm Post subject: |
|
|
yu can use
cout <<"Never fear, C++ is here!" << endl; |
|
| Back to top |
|
 |
Hackerdevelopment Advanced Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 55
|
Posted: Sun Oct 21, 2007 4:10 pm Post subject: |
|
|
| happydud3 wrote: | yu can use
cout <<"Never fear, C++ is here!" << endl; |
That doesnt do anything. I tried it alredy. |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Oct 21, 2007 4:33 pm Post subject: |
|
|
| Hackerdevelopment wrote: | | happydud3 wrote: | yu can use
cout <<"Never fear, C++ is here!" << endl; |
That doesnt do anything. I tried it alredy. |
| Code: | #include <iostream>
#include <conio.h>
using namespace std;
int main()
{
cout <<"Never fear, C++ is here!" << endl;
_getch();
return 0;
} |
Works fine. |
|
| Back to top |
|
 |
|