| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun May 27, 2007 7:11 pm Post subject: Re: New to Programming (First Day) Look at My Progress! |
|
|
| TheSorc3r3r wrote: | | SaviourFamily wrote: | | To turn it into a .exe you have to make a Release version. |
Debug mode compiles to native code too.
@oib111, did you compile as console app & not win32? I can't think of any other reason why that would fail.. what were your errors? |
It's ok, appal already helped me. I was forgetting to compile before I saved so everytime I was getting those fucked unit1.exe (error type), form1.dfm, and form1.pas. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
muffinman177 Master Cheater
Reputation: 0
Joined: 09 Dec 2006 Posts: 377 Location: Drury Lane
|
Posted: Sun Jun 03, 2007 5:02 pm Post subject: |
|
|
| It doesn't work... it just asks the question and then closes |
|
| Back to top |
|
 |
Krloz Grandmaster Cheater
Reputation: 0
Joined: 25 May 2006 Posts: 525 Location: Mexic00l
|
Posted: Sun Jun 03, 2007 5:41 pm Post subject: |
|
|
It does work but you have to add a pause so u can see the result _________________
Pin Skipper
Banned by x0r on Tue May 69, 3662 24:09 am. Expires: ForeVa
Reason: Copying gamesguru sig |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 03, 2007 5:46 pm Post subject: |
|
|
Here is the source code for my thing that does how much you get paid a day on average:
| Code: |
#include <iostream>
using namespace std;
int mult ( int rate, int hours );
int main()
{
int rate;
int hours;
cout<<"Please input two how much you get paid an hour: ";
cin>> rate;
cin.ignore();
cout<<"Please input how many hours you work a day on average:\n";
cin>>hours;
cin.ignore();
cout<<"You get paid $"<<mult ( rate, hours ) << " a day on average\n";
cin.get();
}
int mult ( int rate, int hours )
{
return rate * hours;
}
|
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Jun 03, 2007 6:38 pm Post subject: |
|
|
| oib111 wrote: | Here is the source code for my thing that does how much you get paid a day on average:
|
Using a function like that is a waste of space for a program so small. Just multiply the two variables in the cout.
| Code: | | cout<<"You get paid $"<< (rate*hours) << " a day on average\n"; |
You should also make the variables type float and not type int. |
|
| Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Jun 03, 2007 6:43 pm Post subject: |
|
|
| Flyte wrote: | | Using a function like that is a waste of space for a program so small. Just multiply the two variables in the cout. |
yeah but that was probably an example from a book of how to use a simple function
| Flyte wrote: | | You should also make the variables type float and not type int. |
not unless you really need it, takes more power to process floating point numbers |
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Jun 03, 2007 6:52 pm Post subject: |
|
|
| appalsap wrote: | | Flyte wrote: | | Using a function like that is a waste of space for a program so small. Just multiply the two variables in the cout. | yeah but that was probably an example from a book of how to use a simple function |
I am telling him a better way.
| appalsap wrote: | | Flyte wrote: | | You should also make the variables type float and not type int. | not unless you really need it, takes more power to process floating point numbers |
He does need it. It is a calculator for pay after all, and not everybody is payed by hour right on the dollar.
Oh, and do you just float around looking to contradict me on everything I say?  |
|
| Back to top |
|
 |
Madman I post too much
Reputation: 1
Joined: 04 May 2006 Posts: 3978
|
Posted: Sun Jun 03, 2007 6:59 pm Post subject: |
|
|
lol i saw this in a book  _________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sun Jun 03, 2007 7:15 pm Post subject: |
|
|
Aha, that was when I was noob at C. You could revise it doesn't really matter, except declaring it as an int, that matters... _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
smega How do I cheat?
Reputation: 0
Joined: 13 May 2007 Posts: 1
|
Posted: Tue Jun 05, 2007 7:19 pm Post subject: |
|
|
Pretty good progress, for your first day. I just started java like last week and well.. nvm but your doing really good. _________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jun 05, 2007 7:23 pm Post subject: |
|
|
Dude, he took that a book, that's not real progress. _________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
pyr0magex Grandmaster Cheater Supreme
Reputation: 0
Joined: 26 Jun 2006 Posts: 1192 Location: my room
|
Posted: Thu Jun 07, 2007 9:00 pm Post subject: |
|
|
Yea, I have a lot of C and c++ books and there were a lot of those sorts of examples there.
I mean, it's great to show progress, but to do it, you should try coming up with a more novel idea. _________________
|
|
| Back to top |
|
 |
Thanathos Newbie cheater
Reputation: 0
Joined: 06 May 2007 Posts: 15
|
Posted: Fri Jun 08, 2007 4:04 am Post subject: |
|
|
I'm also on my first day of "Teach Yourself C++ in 21 Days".
This was my first program that the book made me try:
| Code: | #include <iostream.h>
int main()
{
cout << "Hello World!\n";
return 0;
} |
Oh well...who wants to be a leecher forever? At least we are trying right?! |
|
| Back to top |
|
 |
Hans Henrik Expert Cheater
Reputation: 0
Joined: 18 Feb 2007 Posts: 178
|
Posted: Fri Jun 08, 2007 10:49 am Post subject: |
|
|
well... the compiling problem its cus differences in Microsoft Visual C++/Dev C++ _________________
Im not around.
im almost never checking the forum anymore |
|
| Back to top |
|
 |
|