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 


Whats wrong with this code?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Tue Feb 15, 2011 10:49 am    Post subject: Whats wrong with this code? Reply with quote

Code:
// Calculator, by James Fisher
 
// Include the iostream library
#include <iostream>

//Use the standard namespace
using namespace std;

void main ( )
{
   // Declare the variables
   float Number_1 =5;
   float Number_2 =3;
   float Result =Number_1 + Number_2;

   //Print the result
   cout << Result << endl;

}

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Tue Feb 15, 2011 10:53 am    Post subject: Reply with quote

int main(void)
_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
SGL
Grandmaster Cheater
Reputation: 14

Joined: 04 May 2007
Posts: 758

PostPosted: Tue Feb 15, 2011 11:15 am    Post subject: Reply with quote

>calculator
>only adds 2 numbers which can't be changed

_________________
I'm SirGodlike
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Tue Feb 15, 2011 11:16 am    Post subject: Reply with quote

Also, is this in Java?
_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Tue Feb 15, 2011 11:42 am    Post subject: Reply with quote

SGL loves MajjikelKitty wrote:
>calculator
>only adds 2 numbers which can't be changed

This is just a test to see if this works.
I'm changing it afterwards.

and @aviar, it's visual c++

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Aviar³
Grandmaster Cheater
Reputation: 50

Joined: 03 Jan 2008
Posts: 655
Location: Canada

PostPosted: Tue Feb 15, 2011 11:45 am    Post subject: Reply with quote

The Fish wrote:
SGL loves MajjikelKitty wrote:
>calculator
>only adds 2 numbers which can't be changed

This is just a test to see if this works.
I'm changing it afterwards.

and @aviar, it's visual c++


I know, I was just joking.

_________________
This is the inception of deception, checking the depth of your perception.
Back to top
View user's profile Send private message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Tue Feb 15, 2011 12:25 pm    Post subject: Reply with quote

Had I not have such a great day yesterday, I would have probably gone all pissy over how you remind me of customers at work saying "The application doesn't work, why?". How about you post some error logs first. At first glance there doesn't seem to be anything wrong with the code. If you are wondering why it isn't showing the result when you double-click the executable, do the following:

Code:
// Calculator, by James Fisher
 
// Include the iostream library
#include <iostream>

//Use the standard namespace
using namespace std;

void main ( )
{
   // Declare the variables
   float Number_1 =5;
   float Number_2 =3;
   float Result =Number_1 + Number_2;

   //Print the result
   cout << Result << endl;
   system("Pause");

}


Since the application is a console application, it exits as soon as it's done running. Using "system("Pause");" will pause the console application after execution, although it's a terrible piece of code to use in a real application. So don't. You can also just open the command line and type in "<locationOfApp>/MyAppName.exe".
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Tue Feb 15, 2011 12:35 pm    Post subject: Reply with quote

Augustine wrote:
Had I not have such a great day yesterday, I would have probably gone all pissy over how you remind me of customers at work saying "The application doesn't work, why?". How about you post some error logs first. At first glance there doesn't seem to be anything wrong with the code. If you are wondering why it isn't showing the result when you double-click the executable, do the following:

Code:
// Calculator, by James Fisher
 
// Include the iostream library
#include <iostream>

//Use the standard namespace
using namespace std;

void main ( )
{
   // Declare the variables
   float Number_1 =5;
   float Number_2 =3;
   float Result =Number_1 + Number_2;

   //Print the result
   cout << Result << endl;
   system("Pause");

}


Since the application is a console application, it exits as soon as it's done running. Using "system("Pause");" will pause the console application after execution, although it's a terrible piece of code to use in a real application. So don't. You can also just open the command line and type in "<locationOfApp>/MyAppName.exe".

It's a school thing.
but thanks.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Tue Feb 15, 2011 12:36 pm    Post subject: Reply with quote

JAMES FISHER
The fish.
I c wut u did thar.

_________________
Account reclaimed by former owner?
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Tue Feb 15, 2011 12:39 pm    Post subject: Reply with quote

HakATaco wrote:
JAMES FISHER
The fish.
I c wut u did thar.

Yeah, that's where I got my username.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Tue Feb 15, 2011 12:49 pm    Post subject: Reply with quote

>Google James Fisher
>Ongeveer 219.000 resultaten (0,27 seconden)

fuckin a

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Tue Feb 15, 2011 12:58 pm    Post subject: Reply with quote

My name is in the top 10 most common in america.
_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
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