记录详情

Compile Error

foo.cc: In function 'char* StringReplace(std::string&, std::string&, std::string&)':
foo.cc:89:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   89 |         while (nParentIndex < strParentString.size())
      |                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:94:42: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |                         while (nSubIndex < strReplace.size())
      |                                ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:102:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Coordinate>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  102 |                         if (nRange == vtCoordinate.size())
      |                             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:104:53: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  104 |                                 while (nParentIndex < strParentString.size())
      |                                        ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'int main(int, char**)':
foo.cc:147:9: error: 'gets_s' was not declared in this scope; did you mean 'gets'?
  147 |         gets_s(ary_cParent);
      |         ^~~~~~
      |         gets
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1052 OO11-4 string中的查找替换
语言
C++
递交时间
2023-10-19 18:52:33
评测时间
2023-10-19 18:52:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes