View previous topic :: View next topic |
Author |
Message |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Tue Feb 15, 2011 10:49 am Post subject: Whats wrong with this code? |
|
|
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 |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Tue Feb 15, 2011 10:53 am Post subject: |
|
|
int main(void) _________________
This is the inception of deception, checking the depth of your perception.
 |
|
Back to top |
|
 |
SGL Grandmaster Cheater
Reputation: 14
Joined: 04 May 2007 Posts: 758
|
Posted: Tue Feb 15, 2011 11:15 am Post subject: |
|
|
>calculator
>only adds 2 numbers which can't be changed _________________
I'm SirGodlike
 |
|
Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Tue Feb 15, 2011 11:16 am Post subject: |
|
|
Also, is this in Java? _________________
This is the inception of deception, checking the depth of your perception.
 |
|
Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Tue Feb 15, 2011 11:42 am Post subject: |
|
|
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 |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Tue Feb 15, 2011 11:45 am Post subject: |
|
|
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 |
|
 |
Aniblaze Grandmaster Cheater Supreme
Reputation: 138
Joined: 23 Apr 2006 Posts: 1757 Location: The Netherlands
|
Posted: Tue Feb 15, 2011 12:25 pm Post subject: |
|
|
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 |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Tue Feb 15, 2011 12:35 pm Post subject: |
|
|
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 |
|
 |
Maes Advanced Cheater
Reputation: 10
Joined: 09 Apr 2009 Posts: 50
|
Posted: Tue Feb 15, 2011 12:36 pm Post subject: |
|
|
JAMES FISHER
The fish.
I c wut u did thar. _________________
Account reclaimed by former owner? |
|
Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Tue Feb 15, 2011 12:39 pm Post subject: |
|
|
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 |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Tue Feb 15, 2011 12:49 pm Post subject: |
|
|
>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 |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Tue Feb 15, 2011 12:58 pm Post subject: |
|
|
My name is in the top 10 most common in america. _________________
It was nice while it lasted. |
|
Back to top |
|
 |
|