update
This commit is contained in:
commit
6520277de6
5 changed files with 140 additions and 0 deletions
17
main.cpp
Normal file
17
main.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <iostream> // for std::cout
|
||||
|
||||
// Definition of user-defined function doPrint()
|
||||
void doPrint() // doPrint() is the called function in this example
|
||||
{
|
||||
std::cout << "In doPrint()\n";
|
||||
}
|
||||
|
||||
// Definition of function main()
|
||||
int main()
|
||||
{
|
||||
std::cout << "Starting main()\n";
|
||||
doPrint(); // Interrupt main() by making a function call to doPrint(). main() is the caller.
|
||||
std::cout << "Ending main()\n"; // this statement is executed after doPrint() ends
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue