C++ Library Extensions
2022.12.09
To help learn modern C++ programming
031-constructor.cpp
Go to the documentation of this file.
1
#include <
tpf_output.hpp
>
2
3
4
tpf::sstream
stream
;
5
auto
endl
=
tpf::endl
;
6
7
int
which_func
(
const
char
* name)
8
{
9
stream
<< name <<
endl
;
10
return
{};
11
}
12
13
void
which_is_called_first
(
int
a,
int
b)
14
{
15
16
}
17
18
void
test_which_called_first
()
19
{
20
which_is_called_first
(
which_func
(
"Left"
),
which_func
(
"Right"
));
21
}
22
23
int
main
()
24
{
25
test_which_called_first
();
26
}
test_which_called_first
void test_which_called_first()
Definition:
031-constructor.cpp:18
stream
tpf::sstream stream
Definition:
031-constructor.cpp:4
which_is_called_first
void which_is_called_first(int a, int b)
Definition:
031-constructor.cpp:13
which_func
int which_func(const char *name)
Definition:
031-constructor.cpp:7
endl
auto endl
Definition:
031-constructor.cpp:5
main
int main()
Definition:
031-constructor.cpp:23
tpf::output::string_stream
Definition:
tpf_output.hpp:844
tpf::endl
constexpr auto endl
Definition:
tpf_output.hpp:973
tpf_output.hpp
Stream output operators << are implemented.
CppExtension
examples
031-constructor.cpp
Generated by
1.9.4