64,281
社区成员
发帖
与我相关
我的任务
分享
int main(){
char c='x';
while(c!=q){
cin>>c;
cout<<c;
}
cout<<endl;
return ;
}
#include<iostream>
#include <unistd.h>
int main ()
{
std::cout << " world";
write (1, "hello", 5); //write函数不带缓冲
std::cout << std::endl;
}
output:
hello world
#include <Windows.h>
#include <stdio.h>
int main()
{
printf("Start\n");
Sleep(1000);
printf("H");
Sleep(1000 * 10);
printf("\n");
}
然后用秒表掐时间, 看是输出 Start 后 1 秒出现的 H 还是 11 秒后才出现的.
std::streambuf* pcinbuf = std::cin.rdbuf();
double v;
std::cin >> v; //enter: 7.8 and more
std::streambuf* pcoutbuf = std::cout.rdbuf();
std::cout << "hello";
return 0;
VOID WINAPI ExitProcess(
__in UINT uExitCode
);