MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Examples/NoModules/Chapter 13/Ex13_12B/Ex13_12B.cpp:10–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <iostream>
9
10int main()
11{
12 Message beware{ "Careful" };
13 Message warning;
14
15 warning = beware; // Call assignment operator
16
17 Message caution{ warning };
18
19 std::cout << "After assignment beware is: " << beware.getText() << std::endl;
20 std::cout << "After assignment warning is: " << warning.getText() << std::endl;
21 std::cout << "As a copy of warning, caution is: " << caution.getText() << std::endl;
22}

Callers

nothing calls this directly

Calls 1

getTextMethod · 0.45

Tested by

no test coverage detected