<commit_before>//! @Alan
//!
//! Exercise 7.23:
//! Write your own version of the Screen class.
//!
//! Exercise 7.24:
//! Give your Screen class three constructors:
//! a default constructor;
//! a constructor that takes values for height and width and initializes the contents
//! to hold the given number of blanks;
//! and a constructor that takes values for height, width, and a character to use as
//! the contents of the screen.
//!
//!
//!
//! Exercise 7.25:
//! Can Screen safely rely on the default versions of copy and assignment?
//! If so, why? If not, why not?
//!
//  The class below can rely on it. It goes in Section 7.1.5:"..the synthesized versions
//  are unlikely to work correctly for classes that allocate resources that reside outside
//  the class objects themselves. " and "Moreover, the synthesized versions for copy, assignment,
//  and destruction work correctly for classes that have vector or string members. " Hence
//  the class below which used only built-in type and strings can rely on the default
//  version of copy and assignment.
//!

#include <iostream>
#include <string>

class wyScreen
{
public:
    typedef std::string::size_type pos;

    //!  constructs:
    wyScreen() = default;
    wyScreen(const pos h, const pos w) : height(h), width(w)，contents(h * w, ' ') { }
    wyScreen(const pos h, const pos w, const std::string &c) : height(h), width(w) contents(h * w, c) { }

private:<commit_msg>Update ex7_23_24_25.cpp<commit_after>//! @Alan
//!
//! Exercise 7.23:
//! Write your own version of the Screen class.
//!
//! Exercise 7.24:
//! Give your Screen class three constructors:
//! a default constructor;
//! a constructor that takes values for height and width and initializes the contents
//! to hold the given number of blanks;
//! and a constructor that takes values for height, width, and a character to use as
//! the contents of the screen.
//!
//!
//!
//! Exercise 7.25:
//! Can Screen safely rely on the default versions of copy and assignment?
//! If so, why? If not, why not?
//!
//  The class below can rely on it. It goes in Section 7.1.5:"..the synthesized versions
//  are unlikely to work correctly for classes that allocate resources that reside outside
//  the class objects themselves. " and "Moreover, the synthesized versions for copy, assignment,
//  and destruction work correctly for classes that have vector or string members. " Hence
//  the class below which used only built-in type and strings can rely on the default
//  version of copy and assignment.
//!

#include <iostream>
#include <string>

class wyScreen
{
public:
    typedef std::string::size_type pos;

    //!  constructs:
    wyScreen() = default;
	wyScreen(const pos h, const pos w) : height(h), width(w), contents(h * w, ' ') { }
	wyScreen(const pos h, const pos w, const char &c) : height(h), width(w), contents(h * w, c){ }

private:
{'fraction_non_alphanumeric': 0.11813759555246699, 'fraction_numerical': 0.010771369006254344, 'mean_word_length': 3.368740515933232, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4784121', 'n_tokens_mistral': 868, 'n_tokens_neox': 788, 'n_words': 387}