Possible Duplicate:
mixing cout and printf for faster output
I'm using Microsoft Visual Studio 6.0.
The following program,
#include "stdafx.h"
#include "iostream.h"
int main(int argc, char* argv[])
{
printf("a");
printf("b");
printf("c");
return 0;
}
produces "abc".
While the following program,
#include "stdafx.h"
#include "iostream.h"
int main(int argc, char* argv[])
{
printf("a");
cout<<"b";
printf("c");
return 0;
}
produces "acb".
What's the problem? Can't I mix cout and printf in the same program?