foo.cc: In function 'double calculate(std::string)':
foo.cc:108:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
108 | for (int i = 0; i < str.size(); ++i)
| ~~^~~~~~~~~~~~
foo.cc:112:13: warning: unused variable 'figure' [-Wunused-variable]
112 | int figure = 0;
| ^~~~~~
foo.cc: In instantiation of 'STACK::myStack<T>::myStack(int) [with T = char]':
foo.cc:104:19: required from here
foo.cc:13:13: warning: 'STACK::myStack<char>::capacity' will be initialized after [-Wreorder]
13 | int capacity;
| ^~~~~~~~
foo.cc:12:13: warning: 'int STACK::myStack<char>::lenth' [-Wreorder]
12 | int lenth;
| ^~~~~
foo.cc:29:9: warning: when initialized here [-Wreorder]
29 | myStack(int cap = 10) : capacity(cap), lenth(0) { parr = new T[cap]; }
| ^~~~~~~
foo.cc: In instantiation of 'STACK::myStack<T>::myStack(int) [with T = double]':
foo.cc:105:21: required from here
foo.cc:13:13: warning: 'STACK::myStack<double>::capacity' will be initialized after [-Wreorder]
13 | int capacity;
| ^~~~~~~~
foo.cc:12:13: warning: 'int STACK::myStack<double>::lenth' [-Wreorder]
12 | int lenth;
| ^~~~~
foo.cc:29:9: warning: when initialized here [-Wreorder]
29 | myStack(int cap = 10) : capacity(cap), lenth(0) { parr = new T[cap]; }
| ^~~~~~~
foo.cc: In instantiation of 'void result(char, STACK::myStack<T>&) [with T = double]':
foo.cc:130:23: required from here
foo.cc:66:13: warning: unused variable 'result' [-Wunused-variable]
66 | T x, y, result;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务