Files
BasicsOfComputerSoftwareEng…/OOP/test.cpp
2023-06-23 22:13:32 +08:00

29 lines
644 B
C++

#include <iostream>
#include <ctime>
using std::cin;
using std::cout;
using std::endl;
template <int x> struct Factorial {
static const unsigned long long value = x * Factorial<x - 1>::value;
};
template <> struct Factorial<0> {
static const unsigned long long value = 1;
};
std::ostream &f(std::ostream &out) {
out << "hhh";
return out;
}
int main() {
cout << "test" << f << endl;
const std::function<const int(const int)> &func([](const int a) { return a + 1;});
const std::function<const int(const int)> &func2 = func;
std::string aString;
cin >> aString;
cout << aString << endl;
return 0;
}