#include <iostream> class box_world { public: void greeting() const { std::cout << "Cheers, c++ !" << std::endl; } }; int main() { auto box = box_world{}; box.greeting(); }
#include <algorithm> int main() { // c++ array char src[] = {"Hello, c++!"}; // Note: src[11] == '\0' int size = 11 + 1; char * dst = new char[size]; std::copy(src, src+size, dst); delete [] dst; }
#include <algorithm> int main() { // c++ array char src[100]; std::fill(src, src+100, '0'); }
Get Random Number
std::random_device seed; std::mt19937 rng{seed()}; auto rd_value = rng(); std::cout << rd_value << std::endl;
Haiku c++ BEntry Rename
Haiku c++ entry_ref BEntry
day-16: c++ template, the moon
day-15: c++ template
Haiku c++ BFileGameSound play audio
day-14: Virtual
day-13: polymorphism c++
Windows: Microsoft Visualcpp [c++ compiler]
Haiku: gcc [c++ compiler]
day-12: c++ class: multiple inheritance
day-11: Miscellaneous
day-11: 3 minutes: c++ using - the type alias
day-11: 7 minutes: c++ method const, return type const
day-11: 5 minutes: c++ namespace
c++ Lvalue and Rvalue
c++ Lvalue and Rvalue: 01
Botan asio tls https