ch+1//将ch转换成int然后和1相加后输出(隐式类型转换,因为1是int型)
++ch//输出下一个对应的字符(输入A,就输出B)
#include "stdafx.h"
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
char ch;
cout<<"Enter some word:\n";
cin.get(ch);
while (ch!='.')
{
if (ch=='\n')
{
cout<<ch;
}
else
{
cout<<ch+1; //++ch显示下一个对应的字符
}
cin.get(ch);
}
system("pause");
return 0;
}