For example take a loot at this:
The first keyword int represents the type of myFunc.Right ?Code:int myFunc(int x, int y); //prototype
The next word myFunc is the name of my user defiened function. Right ?
The () indicates the list of parameters. Right ?
The int x and int y are the parameters followed by their type and name, separated by commas. Right ?
Which are the arguments ? I think that they are the actual values of these variables passed to myFunc. Take a look:
Code:#include <iostream> int myFunc(int x, int y); int main() { using std::cout; int result; result = myFunc(2,3); //Are 2,3 the arguments ????? or they are parameters too ? cout << "2 multiple 3 = " << result << std::endl; std::system("PAUSE"); return 0 ; } int myFunc(int x, int y) { return (x * y); }



LinkBack URL
About LinkBacks



