Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Problem!
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hackerdevelopment
Advanced Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 55

PostPosted: Sat Oct 20, 2007 1:18 pm    Post subject: Problem! Reply with quote

I am using dev c++.

I place this:

#include <iostream>
using namespace std;

int main() {
cout<<"Never fear, C++ is here!";
return 0;
}

I compile it and run but wen it runs it closes before i get to see it.
Wat can i do?
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Oct 20, 2007 1:22 pm    Post subject: Reply with quote

Go here: http://forum.cheatengine.org/viewtopic.php?t=138877&start=0

This person had the same problem as you.
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Oct 20, 2007 1:23 pm    Post subject: Reply with quote

use cin.get();
Back to top
View user's profile Send private message
Hackerdevelopment
Advanced Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 55

PostPosted: Sat Oct 20, 2007 1:31 pm    Post subject: Reply with quote

Is there any other compiler i can use? That wont make it close?
Some one give me a download link.
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Oct 20, 2007 1:33 pm    Post subject: Reply with quote

Hackerdevelopment wrote:
Is there any other compiler i can use? That wont make it close?
Some one give me a download link.


read what I posted, use this:

Code:
#include <iostream>
using namespace std;

int main() {
cout<<"Never fear, C++ is here!";
cin.get();
}


Or run it in cmd mode:
Start => run => cmd => enter this:
Code:
cd C:\where\is\your\exe
loololol.exe
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Oct 20, 2007 1:34 pm    Post subject: Reply with quote

Hackerdevelopment wrote:
Is there any other compiler i can use? That wont make it close?
Some one give me a download link.


It isn't the compiler that makes it close, it is the program itself. Go to the link I gave you.
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Sat Oct 20, 2007 1:44 pm    Post subject: Reply with quote

I think that someone should make a topic about such things and stick it, this is about the 234645724 time that someone asks this question..
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Oct 20, 2007 1:57 pm    Post subject: Reply with quote

God, I'm so sick of people posting the same thing. Just replace cin.get(); with return 0. But then some people will say to have return 0; since you did say to return an int to main, so you cna just put cin.get(); before return 0;. So it can be this:

Code:

#include <iostream>

using namespace std;

int main()
{
    cout<<"Never fear, C++ is here!";
    cin.get();
}


or

Code:

#include <iostream>

using namespace std;

int main()
{
    cout<<"Never fear, C++ is here!";
    cin.get();
    return 0;
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Hackerdevelopment
Advanced Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 55

PostPosted: Sat Oct 20, 2007 2:03 pm    Post subject: Reply with quote

Wait. Y does it close so fast?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Oct 20, 2007 2:07 pm    Post subject: Reply with quote

because it did everything you said it have to do then the next one is it has to close.
But cin.get() waits for an entry.
Back to top
View user's profile Send private message
Hackerdevelopment
Advanced Cheater
Reputation: 0

Joined: 11 Oct 2007
Posts: 55

PostPosted: Sat Oct 20, 2007 2:18 pm    Post subject: Reply with quote

Alright thanks!
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Oct 20, 2007 6:54 pm    Post subject: Reply with quote

use #include <stdio.h> and #inclue <conio.h> and then instead of return 0 use getch(); and instead int main() use void main().
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sat Oct 20, 2007 6:56 pm    Post subject: Reply with quote

printf();
Back to top
View user's profile Send private message
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Sat Oct 20, 2007 6:59 pm    Post subject: Reply with quote

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().


Confused

_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Oct 20, 2007 7:03 pm    Post subject: Reply with quote

Pretty sure symbol and kasper = delphi peplz, so don't listen to their C++ nonsense.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites