1. Mandatory type conversion for character type applications:
#include <iostream>
using namespace std;
int main ()
{for
(int i=32;i<128;i++)
{
cout<< (char) i;
}
cout<<endl;
return 0;
}
Run Result:
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/cplus/
2. Special characters:
The code is as follows:
#include <iostream>
using namespace std;
int main ()
{
cout<< "special characters character";
Char ch= ' \ r '; / R indicates carriage return, but it is not equal to wrapping. * *
cout<<ch<< "special purpose";
return 0;
}
Run Result:
Why is this result entered?
A: This question goes back to the typewriter era, when the typewriter had to jump to the next line for entry,
The first step is to return to the beginning of the line, and then push the paper up one line, so the return function simply returns to the beginning of the line.
Author: cnblogs Nebula