about "cout "
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
int main()
{
char buf[10] ;
memset(buf,128,sizeof(buf)) ;
cout << endl << hex << buf << endl ;
for(int j =0 ;j<10 ;j++)
{
cout << " " << hex << (unsigned char) buf[j] ;
}
cout << endl ;
for(int i =1 ;i<10 ;i++)
{
printf(" %x",(unsigned char)buf[i]);
}
return 0 ;
}
printf能输出 80 80 80 80 80 ....
怎样使用cout 输出呢?