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 


New to Programming (First Day) Look at My Progress!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Turochek
Newbie cheater
Reputation: 0

Joined: 20 May 2007
Posts: 13

PostPosted: Fri May 25, 2007 6:39 pm    Post subject: New to Programming (First Day) Look at My Progress! Reply with quote

Here's my first ever program run in C++. I'm not sure how to present it as an .exe file, so I'll just put the code.

// This progam calculates the user's pay.

#include <iostream>
using namespace std;

int main()
{
float hours, rate, pay;

cout << "How many hours did you work? ";
cin >> hours;
cout << "How much do you get paid per hour? ";
cin >> rate;
pay = hours * rate;
cout.precision(2);
cout.setf(ios::fixed | ios::showpoint);
cout << "You have earned $" << pay << endl;
return 0;
}


She's my baby, and I'm such a proud father. Very Happy
Back to top
View user's profile Send private message
benlue
Moderator
Reputation: 0

Joined: 09 Oct 2006
Posts: 2142

PostPosted: Fri May 25, 2007 6:44 pm    Post subject: Reply with quote

Pretty good progress . As motivation , just compile and run and you'll get the hang of how the programs work . Wink

*Good luck* and best wishes !
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: Sun May 27, 2007 12:26 am    Post subject: Reply with quote

You should fix that, I got like 10 errors when I tried to compile, and yes I was using C/C++ compiler not delphi...
_________________


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
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sun May 27, 2007 4:20 am    Post subject: Reply with quote

oib111 wrote:
You should fix that, I got like 10 errors when I tried to compile, and yes I was using C/C++ compiler not delphi...


Then your compiler sucks dick! This is fine!
Back to top
View user's profile Send private message MSN Messenger
hakkairu
Legendary
Reputation: 0

Joined: 02 Dec 2006
Posts: 1301

PostPosted: Sun May 27, 2007 7:19 am    Post subject: Reply with quote

This was mine XD

Code:
#include <iostream>

int main()
{
    std::cout << "Hello, world!\n";
}
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: Sun May 27, 2007 9:12 am    Post subject: Reply with quote

noz3001 wrote:
oib111 wrote:
You should fix that, I got like 10 errors when I tried to compile, and yes I was using C/C++ compiler not delphi...


Then your compiler sucks dick! This is fine!


My compiler is Dev-C++. It was recommended to me from the site I am taking C++ tutorials. And have you tried compiling it? I mean it looks fine but I can't compile it.

_________________


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
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Sun May 27, 2007 9:14 am    Post subject: Reply with quote

Don't use DEV C++.
_________________
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: Sun May 27, 2007 9:39 am    Post subject: Reply with quote

Would you suggest a different a compiler? Btw, here is my work for my 1st day:

Code:

 
#include <iostream>

using namespace std;

int dev ( int x, int y );

int main()
{
  int x;
  int y;
 
  cout<<"Please input two numbers to be devided:\n";
  cin>> x >> y;
  cin.ignore();
  cout<<"The quotient of your two numbers is "<< dev ( x, y ) <<"\n";
  cin.get();
}

int dev ( int x, int y )
{
  return x / y;
}


It devides 2 numbers for you. It's kind of useless because there is a calculator on everyones com but still...

_________________


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
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Sun May 27, 2007 9:46 am    Post subject: Reply with quote

Appalsap recommended code::blocks for some other dude. I personally use VC++
_________________
Back to top
View user's profile Send private message
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Sun May 27, 2007 10:24 am    Post subject: Reply with quote

zomgiownyou wrote:
Appalsap recommended code::blocks for some other dude. I personally use VC++

code::blocks is an IDE; what this guy needs is a compiler.

_________________

Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
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: Sun May 27, 2007 11:43 am    Post subject: Reply with quote

DeltaFlyer wrote:
zomgiownyou wrote:
Appalsap recommended code::blocks for some other dude. I personally use VC++

code::blocks is an IDE; what this guy needs is a compiler.


Well no duh. Man screw this I will just get Borland 2005 C++

_________________


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
SF
I'm a spammer
Reputation: 119

Joined: 19 Mar 2007
Posts: 6028

PostPosted: Sun May 27, 2007 2:06 pm    Post subject: Re: New to Programming (First Day) Look at My Progress! Reply with quote

Turochek wrote:
Here's my first ever program run in C++. I'm not sure how to present it as an .exe file, so I'll just put the code.

// This progam calculates the user's pay.

#include <iostream>
using namespace std;

int main()
{
float hours, rate, pay;

cout << "How many hours did you work? ";
cin >> hours;
cout << "How much do you get paid per hour? ";
cin >> rate;
pay = hours * rate;
cout.precision(2);
cout.setf(ios::fixed | ios::showpoint);
cout << "You have earned $" << pay << endl;
return 0;
}


She's my baby, and I'm such a proud father. Very Happy


To turn it into a .exe you have to make a Release version.

I know how..but dunno how. There's stuff I had to copy before to make a release in school, teacher showed me then I forgot.
Back to top
View user's profile Send private message
TheSorc3r3r
I post too much
Reputation: 0

Joined: 06 Sep 2006
Posts: 2404

PostPosted: Sun May 27, 2007 3:59 pm    Post subject: Re: New to Programming (First Day) Look at My Progress! Reply with quote

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?

_________________


Don't laugh, I'm still learning photoshop!
Back to top
View user's profile Send private message
Meso
Master Cheater
Reputation: 0

Joined: 16 May 2007
Posts: 292
Location: Behind my moniter

PostPosted: Sun May 27, 2007 4:51 pm    Post subject: Re: New to Programming (First Day) Look at My Progress! Reply with quote

Turochek wrote:
Here's my first ever program run in C++. I'm not sure how to present it as an .exe file, so I'll just put the code.

// This progam calculates the user's pay.

#include <iostream>
using namespace std;

int main()
{
float hours, rate, pay;

cout << "How many hours did you work? ";
cin >> hours;
cout << "How much do you get paid per hour? ";
cin >> rate;
pay = hours * rate;
cout.precision(2);
cout.setf(ios::fixed | ios::showpoint);
cout << "You have earned $" << pay << endl;
return 0;
}


She's my baby, and I'm such a proud father. Very Happy


ROFL THATS FROM A C++ BOOK I READ ONCE HAHA U PHAIL

_________________

Level 19x 1337 Ranger - Hunterstory Razz Using no Skill just normal attack.
HunterStory 0.6 New map and rankings! PIANUS NOW
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun May 27, 2007 4:54 pm    Post subject: Reply with quote

DeltaFlyer wrote:
Code::blocks is an IDE; what this guy needs is a compiler.


Code::blocks is a good free IDE, and many companies (microsoft, borland) will sell their IDEs but give away their command line compile tools for free. If you set up Code::blocks to use those you can have a nice functional IDE with the functionality and flexibility of the more expensive tools.
Back to top
View user's profile Send private message
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  Next
Page 1 of 2

 
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