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

Function main

Examples/NoModules/Chapter 13/Ex13_12A/Ex13_12A.cpp:6–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

getTextMethod · 0.45

Tested by

no test coverage detected