Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
#include <string>
#include "big_data_int.h"

string getString(){
auto* str = new string();
str->reserve(100);
std::cout << "请输入内容:";
std::cin.getline(str->c_str(), 100); // 直接读取到缓冲区

std::cout << "输入内容:" << str->c_str() << std::endl;

return str;
}

int main()
{
cout<<"please input two numbers:"<<endl;
string s_a, s_b;
cin>>s_a;
cin>>s_b;
s_a = getString();
s_b = getString();

cout<<"Please input the operator(+,-,*,/,%):"<<endl;
string op;
Expand Down