-
Notifications
You must be signed in to change notification settings - Fork 0
void sample_function()
CountrySideEngineer edited this page Nov 9, 2022
·
3 revisions
This page describes the stub code for function like void sample_function()
.
(A method with no return and argument.)
The stub codes in source file is like below:
long sample_function_called_count;
void sample_function_init()
{
sample_function_called_count = 0;
}
void sample_function()
{
sample_function_called_count++;
}
A method sample_function_init()
is a method to initialize the variable sample_function_called_count
.
The stub code in header file is like below:
extern long sample_function_called_count;
void sample_function_init();