COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
birthday.cpp File Reference
#include <iostream>
Include dependency graph for birthday.cpp:

Go to the source code of this file.

Functions

void birthday (int &b)
 
int main ()
 

Function Documentation

◆ birthday()

void birthday ( int & b)

Definition at line 5 of file birthday.cpp.

5 {
6 // pass by reference
7 // int& b vs int &b <-- no difference
8 b++;
9}

Referenced by main().

Here is the caller graph for this function:

◆ main()

int main ( void )

Definition at line 13 of file birthday.cpp.

13 {
14 int myAge;
15 cin >> myAge;
16 birthday(myAge);
17 cout << "My age after birthday is " << myAge;
18}
void birthday(int &b)
Definition birthday.cpp:5

References birthday().

Here is the call graph for this function: