关于网友提出的“ 入门级C++问题”问题疑问,本网通过在网上对“ 入门级C++问题”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: 入门级C++问题描述:
char temp = 'a';
printf("%c\t%d\n",temp,temp);
这句C用C++的cout怎么写???
求教
解决方案1:
解决方案2:
#include
using namespace std;
void main()
{
char temp = 'a';
printf("%c\t%d\n",temp,temp);
cout<<><>(temp)<<>
}
cout << temp << "\t" << (int)temp << "\n";
这样就可以了吧
cout<<><>