Profile icon
VofaDev
@VofaDev
(Now an alt account for @wsDev)
Copper
Made with BashRecent comments (6)mollthecoder2 years agoIs this working yet?
xxpertHacker2 years agoHey, just a small tip: a few of the standard library's string-related types and numerical types have user-defined-literal operators for creating them.
std::string
is among those types, there is astd::operator""s
provided for constructing them from string literals.std::string foo = std::string("foo"); std::string bar = std::string("bar"); // vs using std::operator""s; // unnecessary in your case, since you already included the entire {namespace std} std::string foo = "foo"s; std::string bar = "bar"s;
seeing as you passed string literals to the
std::string
constructor a few times, I thought that you might be interested in cutting down the code.XanthusPettitt2 years agohuh this is cool I would like to try to make a calc out of this when its done
All Repls