摘要:
请实现一个函数,把字符串 s 中的每个空格替换成"%20"。 class Solution { public: string replaceSpace(string s) { int len = s.size(); int count = 0; //统计空格数量 for (char& c : s) 阅读全文
摘要:
1.静态成员函数与普通成员函数的根本区别在于:普通成员函数有 this 指针,可以访问类中的任意成员;而静态成员函数没有 this 指针,只能访问静态成员(包括静态成员变量和静态成员函数)。 2.C++类成员函数后面加const有什么作用:https://linjingtu.blog.csdn.ne 阅读全文