#include <xtd/xtd>
public:
character() = default;
character(const string& name, const string& rank) noexcept : name_(name), rank_(rank) {}
const string& name() const noexcept {return name_;}
const string& rank() const noexcept {return rank_;}
if (fmt == "F") return name_ + " (" + rank_ + ")";
if (fmt == "N") return name_;
if (fmt == "R") return rank_;
}
private:
string name_;
string rank_;
};
auto main() -> int {
try {
auto char1 = character {"Jean-Luc Picard", "Captain"};
}
}
bool is_empty() const noexcept
Definition basic_string.hpp:3534
Defines the base class for predefined exceptions in the xtd namespace.
Definition exception.hpp:29
Provides information about a specific culture (called a locale for unmanaged code development)....
Definition culture_info.hpp:43
static culture_info current_culture() noexcept
Gets the xtd::globalization::culture_info object that represents the culture used by the current appl...
@ e
The E key.
Definition console_key.hpp:96
Contains classes that define culture-related information, including language, country/region,...
Definition culture_info.hpp:20
void println(FILE *file)
Writes the current line terminator to the file output stream using the specified format information.
Definition println.hpp:14
string to_string() const noexcept override
Returns the string representation of this xtd::read_only_span <type_t> object.
Definition read_only_span.hpp:375