#include <iostream>
#include <string>
using namespace std;
int main()
{
string str(<a target=_blank href="http://www.csdn.net">www.csdn.net</a>);
for (char &i : str)
{
i = '+';
cout << i;
}
cout << endl;
std::cout << str << endl;
string s;
cout << s[0] << endl;
string str2 = "c,s.d'n;";
string result;
for (auto &k : str2)
{
if (ispunct(k))
;
else
result += k;
}
cout << result << endl;
const string str3 = "Nice Play!";
for (auto &c : str3)
{
cout << c;
}
getchar();
return 0;
}
Do you know what kind of type c is?
yes ,you're right,it's a const char&.