代码没问题,编译-o参数后面名字要加上.exe。
可以换行啊,代码正确的
cout语句换行:cout<<"hello world"<<endl;\n是用在printf语句的:printf("hello world\n");