cout 的执行顺序问题
三尺青萍 2012-03-08 05:14:03 #include<string>
#include<iostream>
#include<stdio.h>
using namespace std;
main()
{
char str[] = "Hapqy New year!";
char *s =str;
int a=4;
cout<<a<<a++<<endl;//为什么输出的是54而不是45
*s++;
cout<<(*s)++<<*s++<<endl;//为什么输出的是aa,而不是pa
cout<<*s<<endl;//输出的是Hbpqy New year!
//printf("%s\n",*str);
cout<<str<<endl;
return 0;
}