Add tags

Add tags to the following comment

こんにちは。 このコードは環境に依存しています。標準ではありません。 でも、C/C++だとstdioもiosteamもブロッキングされちゃうのでこういうコード書くしか手がないと思われます。 抜け道募集。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include <stdio.h>
#include <conio.h>

int main(){
    bool Output=true;
    int ch=0;
    do{
        ch = 0;
        if(_kbhit()) ch  = _getch();//環境依存コード。
        if(ch == 'p') Output = !Output;
        if(Output) printf("A");
    }while(ch != 'q');

}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...