-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathUtility.cpp
More file actions
27 lines (21 loc) · 859 Bytes
/
Utility.cpp
File metadata and controls
27 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "Utility.h"
#include <iostream>
#include <ostream>
using namespace std;
using namespace Utility;
// Дефиниции stand-alone функций в пространствах имён:
void Utility::PrintIsEvenResult(int value) {
wcout << L"The number " << value << L" is "
<< (IsEven(value) ? L"" : L"not ") << L"even." << endl;
}
void Utility::PrintIsEvenResult(long long value) {
wcout << L"The number " << value << L" is "
<< (IsEven(value) ? L"" : L"not ") << L"even." << endl;
}
void Utility::PrintBool(bool value) {
wcout << L"The value is" << (value ? L"true." : L"false.") << endl;
}
// Если использовать вложенные пространства имён, то нужно включать всю цепочку:
// void RootSpace::SubSpace::SubSubSpace::FunctionName(int param) {
// ...
// };