I made an Elven pack calculator console app

As someone who likes to buy packs and sell them, I’m always curious on how much profit I’m actually making without thinking too much. So that’s why I made a console app that caters to elven pack sellers (or potentially buyers).

With this console app, you can:
-Assign Stocks & Prices

-Calculate Total Price with PWE VIP/Reg tax

-Sort Items from least to most profitable based on stocks and prices

Things to add:
-Total gems used based on stocks
-Net profit calculator based on preferred gem price
(and possibly more)

Will release or share the source code at least if there’s a handful of people interested in this.
This is all made in VS 2022 using c++

2 Likes

This will print the numbers with commas.

static std::string fmtint( long i ) {
int n, end;
std::string s = std::to_string(i);
n = s.length() - 3;
end = (i >= 0) ? 0 : 1;
while (n > end) {
s.insert(n, “,”);
n -= 3;
}
return s;
}

static void printint( long i ) {
const std::string s = fmtint(i);
printf(“%s”, s.c_str());
}

Thanks. I had a bit of a headache trying to understand printf(“%s”, s.c_str());, but I got it. Is it better to use than the ol’ cout << s?

1 Like