1
0
Fork 0
This repository has been archived on 2021-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
uni-m.cds-adv-prog/ex2.3/namespacing.cpp
2019-12-10 18:04:54 +01:00

34 lines
355 B
C++

#include <iostream>
namespace Black {
void print(int k) {
std::cout << "Black print" << std::endl;
};
}
namespace White {
void print(int k) {
std::cout << "White print" << std::endl;
};
}
void sub1() {
using White::print ;
print(5);
}
void print(int k) {
if ( k > 0 )
{
print(k-1);
}
}
int main() {
sub1();
print(7);
return 0;
}