Sunday, August 2, 2009

Functions in C++?

how would i write a function for


if somone can provide me with the calls and how to do the proptotypes i have been looking o n other websites but am having difficulity grapshing the concept of functions how would i write


number of students in a class(value return)


ifnroamtion for 3 courses(pas by reference)


caculate total gpa(usa a fn)


caculate letter grade (use a fn)

Functions in C++?
you can find it out from


http://tutorialofc.blogspot.com/
Reply:#inlcude %26lt;iostream%26gt;


using namespace std;





int add(int x, int y);





int main()


{


int temp;


temp add(56,34);


}





int add(int x,int y)


{


return (x + y);


}





basically the function just replace the x with 56 and y with 34.





If you really want to learn more goto


3dbuzz.com





It has great videos that teach you alot.
Reply:Here's a good video that explains functions, function calls, declarations and definitions in C++:





http://xoax.net/comp/cpp/console/Lesson1...





Here's a video on passing parameters:





http://xoax.net/comp/cpp/console/Lesson1...
Reply:You may contact a c++ helper live at website like http://ccietutorial.com/


No comments:

Post a Comment