stdio支持

This commit is contained in:
ArchZer0
2026-08-16 16:28:12 +08:00
parent 1f8fa26d73
commit ceb7c3fa44
11 changed files with 249 additions and 0 deletions
+5
View File
@@ -2,6 +2,7 @@
#define BETTERSTL_BIG_DECIMAL_H
#include <string>
#include <iostream>
#include <bstl/big_integer.hpp>
namespace bstl {
@@ -69,6 +70,10 @@ private:
BigInteger& rhs, int& rhsScale);
};
// 流运算符重载
std::ostream& operator<<(std::ostream& os, const BigDecimal& bd);
std::istream& operator>>(std::istream& is, BigDecimal& bd);
} // namespace bstl
#endif //BETTERSTL_BIG_DECIMAL_H
+5
View File
@@ -2,6 +2,7 @@
#define BETTERSTL_BIG_INTEGER_HPP
#include <string>
#include <iostream>
namespace bstl {
@@ -65,6 +66,10 @@ private:
static std::string divAbs(const std::string& a, const std::string& b);
};
// 流运算符重载
std::ostream& operator<<(std::ostream& os, const BigInteger& bi);
std::istream& operator>>(std::istream& is, BigInteger& bi);
} // namespace bstl
#endif //BETTERSTL_BIG_INTEGER_HPP
+5
View File
@@ -4,6 +4,7 @@
#include <vector>
#include <algorithm>
#include <cctype>
#include <iostream>
namespace bstl {
@@ -89,4 +90,8 @@ private:
std::string data_;
};
// 流运算符重载
std::ostream& operator<<(std::ostream& os, const String& str);
std::istream& operator>>(std::istream& is, String& str);
} // namespace bstl