
|
Home Blog Me Funbox Photo Gallery Entertainment Scripts Tutorials Programming Fundamentals Programming in C++ Part 1 Part 2 Part 3 Part 4 Part 5 Part 6 Part 7 Part 8 Part 9 Part 10 Visual BASIC Programming Horoscope Writing Site Center Links/Blogrolls Living Room Furniture |
Prewritten FunctionsC++ doesn't offer many built in keywords or functions, and that's alright because with many compilers comes standard header files. These header files contain functions that we can use to enhance our programs and not write new functions. To call a function we either use an output statement or store it in a variable. We put the function name and then enter parenthases and put in the required parameters. A parameter is what is being passed down to the function. Assuming we already initialized the variables and have the proper heading file, to call the pow function and put into a variable x would be:
The pow will take the 2.0 and put it to the 9th power. Below is a table which lists some useful functions, the type of parameters, and which header file they're in.
There are many more prewritten functions that come with the compilers, and many more that you can download from the web. I have just listed what I feel are the most useful prewritten functions. In the next section you'll learn how to write your own. Next Section: Writing Your Own Functions |
Copyright © 2004-2008 Sean Noble, All rights reserved
Read our Disclosure Policy


