使用iostream和iostream.h中遇到的编程问题

运行下面两个程序为什么它的运行结果会不同,求大神解决
#include
#include
#include
#include
void gotoxy(int x, int y)//定位光标
{
COORD pos;
pos.X = x * 2;
pos.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}

int main(void)
{
using std::cout;
int x=0;
while(x {
x=x+2;
gotoxy(x,14);
cout }
cout system("pause");
return 0;
}
#include
#include
#include
#include
void gotoxy(int x, int y)//定位光标
{
COORD pos;
pos.X = x * 2;
pos.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}

int main(void)
{
int x=0;
while(x<20)
{
x=x+2;
gotoxy(x,14);
cout<<"*";
}
cout<<endl;
system("pause");
return 0;
}

一个是标准库,一个是带命名空间,所以是不同的