Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:cpp:shellcommand [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:cpp:shellcommand

以前のリビジョンの文書です



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line 1458

Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 79

Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 101

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3120 in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

====== Shellコマンドを実行 ====== ---- パイプ(コマンドの標準出力)を <code cpp> char *command = "..."; FILE *pipe; char buffer[256]; if( (pipe = popen(command,"r"))==NULL ){// パイプをopen std::cout << "failed." << std::endl; return 1; } while( fgets(buffer,sizeof(buffer),pipe)!=NULL ){ strtok(buffer,"\n\0");// bufferには改行コードが含まれてしまっているのでそれをNULLに置換 .... .... // コマンドの標準出力を1行ずつ読んで処理を実行 .... } pclose(pipe); // パイプをclose </code>

ja/cpp/shellcommand.1496371480.txt.gz · 最終更新: 2017/06/02 02:44 by kota