33 lines
607 B
C++
33 lines
607 B
C++
|
#ifndef EXERCISE_2_HPP_
|
||
|
#define EXERCISE_2_HPP_
|
||
|
|
||
|
#include <ostream>
|
||
|
|
||
|
//class endline
|
||
|
//{
|
||
|
//public:
|
||
|
// friend std::ostream& operator<<(std::ostream &out, const endline&);
|
||
|
//};
|
||
|
//
|
||
|
//std::ostream& operator<<(std::ostream &out, const endline& e)
|
||
|
//{
|
||
|
// out << "\n\n";
|
||
|
// out.flush();
|
||
|
//
|
||
|
// return out;
|
||
|
//}
|
||
|
//
|
||
|
//endline endll;
|
||
|
|
||
|
template<typename _CharT, typename _Traits>
|
||
|
inline std::basic_ostream<_CharT, _Traits>&
|
||
|
endll(std::basic_ostream<_CharT, _Traits>& __os)
|
||
|
{ return flush((__os.put(__os.widen('\n'))).put(__os.widen('\n'))); }
|
||
|
|
||
|
void exercise_2()
|
||
|
{
|
||
|
std::cout << "Hello" << endll << "world";
|
||
|
}
|
||
|
|
||
|
#endif
|