#include <iostream>
#include <type_traits>
#include <cassert>
class Factoral
{
public://begin public section
unsigned int get_number() const { return its_number ; }
void set_number(unsigned int number);//accessor member function
unsigned int get_value() const { return its_value ; }
void set_value ();
private://begin private section
unsigned int its_number;//member variable
unsigned int its_value;//member variable
};
int main()
{
std::cout << std::boolalpha
<< std::has_trivial_default_constructor<unsigned int>::value << '\n' // true
<< std::has_trivial_default_constructor<Factoral>::value << '\n' ; // true
Factoral myFactoral{} ; // value initialized
assert( myFactoral.get_number() == 0 && myFactoral.get_value() == 0 ) ;
std::cout << myFactoral.get_number() << '\n' // 0
<< myFactoral.get_value() << '\n' ; // 0
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+CiNpbmNsdWRlIDxjYXNzZXJ0PgoKY2xhc3MgRmFjdG9yYWwKewogICAgIHB1YmxpYzovL2JlZ2luIHB1YmxpYyBzZWN0aW9uCiAgICAgICAgICAgIHVuc2lnbmVkIGludCBnZXRfbnVtYmVyKCkgY29uc3QgeyByZXR1cm4gaXRzX251bWJlciA7IH0KICAgICAgICAgICAgdm9pZCBzZXRfbnVtYmVyKHVuc2lnbmVkIGludCBudW1iZXIpOy8vYWNjZXNzb3IgbWVtYmVyIGZ1bmN0aW9uCiAgICAgICAgICAgIHVuc2lnbmVkIGludCBnZXRfdmFsdWUoKSBjb25zdCB7IHJldHVybiBpdHNfdmFsdWUgOyB9CiAgICAgICAgICAgIHZvaWQgc2V0X3ZhbHVlICgpOwogICAgIHByaXZhdGU6Ly9iZWdpbiBwcml2YXRlIHNlY3Rpb24KICAgICAgICAgICAgdW5zaWduZWQgaW50IGl0c19udW1iZXI7Ly9tZW1iZXIgdmFyaWFibGUKICAgICAgICAgICAgdW5zaWduZWQgaW50IGl0c192YWx1ZTsvL21lbWJlciB2YXJpYWJsZQp9OwoKaW50IG1haW4oKQp7CiAgICBzdGQ6OmNvdXQgPDwgc3RkOjpib29sYWxwaGEKICAgICAgICAgICAgICAgPDw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