| View previous topic :: View next topic |
| Author |
Message |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Thu Jul 26, 2007 7:27 pm Post subject: |
|
|
| oib111 wrote: | 1. By Software I assume you mean compiler. Borland C++
2. Unclear. Do you mean what it is or its syntax?
3. You don't have a uses list. You have header files. They can be compared to uses list. So I guess in a since yes.
4. That's part of learning the language.
5. You use ; to end. The endl function ends the line. [/url] |
thanks for the help, about 2 i ment like procedure as syntax, void ?
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Jul 26, 2007 7:36 pm Post subject: |
|
|
Oh yeah. There actually called functions.
I will give a multiplying program with a function and I will explain it to you.
| Code: |
#include <iostream>
using namespace std;
float mult ( float x, float y ); //1:function declaration
int main()
{
float x;
float y;
cout<<"Factor please:\n";
cin>> x;
cin.ignore();
cout<<"Factor please:\n";
cin>> y;
cin.ignore();
cout<<"The product is "<< mult ( x, y ) <<".\n"; //2: function called and parameter passing
cin.get();
}
float mult ( float x, float y )
{
return x * y; //3: code within function
}
|
On my first comment, a function named mult was decalred with to parameters that are floats. It is also declared to return a float value.
On my second comment, the function is called within the insertion operators and then the variables x and y are passed into the variables x and y in the function.
And on my third comment the function code is started.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Thu Jul 26, 2007 7:42 pm Post subject: |
|
|
| Kaspersky wrote: | | oib111 wrote: | 1. By Software I assume you mean compiler. Borland C++
2. Unclear. Do you mean what it is or its syntax?
3. You don't have a uses list. You have header files. They can be compared to uses list. So I guess in a since yes.
4. That's part of learning the language.
5. You use ; to end. The endl function ends the line. [/url] |
about 2 i ment like procedure as syntax, void ? |
Depends on your function. But for the main function (main) it can be
| Code: | int main ( int argc, char *argv[] )
int main () |
The argc is an argument that can be passed if your application is run through command prompt. Yet again I'm going to tell you to go learn C instead.
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Jul 26, 2007 7:44 pm Post subject: |
|
|
C is good. I suggest. Here is a good starting site. http://www.cprogramming.com/
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Varreon Advanced Cheater
Reputation: 0
Joined: 13 Jun 2007 Posts: 80
|
Posted: Tue Jul 31, 2007 10:32 am Post subject: |
|
|
Wow, I guess this is a pretty Delphi / C++ balanced forum. I've been using BCB, but my faggot for maplestory is pure W32 C++. Once you get a hang of it, it's just as easy, and you can do more custom window effects.
_________________
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue Jul 31, 2007 11:54 am Post subject: |
|
|
| delphi cuz i cant understand no shit about about c/c++ and asm is a bit complicated i know a bit only cuz AA...
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Tue Jul 31, 2007 4:35 pm Post subject: |
|
|
"If CE was written in C, it would be like C FTW!"
Not true. CE's GUI and some other coding was done in delphi, but most of it was done in C.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
|