• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            馬賽克007歡迎你

            htt://shexinwei.blogbus.com

            http://www.shnenglu.com/shexinwei

            感謝大家的支持

            the difference of some Input function

            1 /* 2 Subject: the difference of gets(),getch(),getchar() and getline() 3 Author: shexinwei 4 School: xidian university 5 Date: 2010-09-09 6 Laguage: C++ 7 IDE: visual studio 6.o 8 Version: 1.0 9 Modify Time: 2010-09-09 10 */ 11 #include <iostream> 12 using namespace std; 13 #include <conio.h> 14 #define MAX_LEN 20 15 int main() 16 { 17 18 //gets() : Get a line from the stdin stream. 19 //Get a line from the stdin stream. 20 21 cout<<"the function gets():"<<endl; 22 char buffer[MAX_LEN]; 23 gets(buffer); 24 cout<<buffer<<endl; 25 26 // getchar(): 27 // marco: #define getchar() getc(stdin) File: STDIO.H Get a character from a file; 28 // function: _CRTIMP int __cdecl getchar(void); File: STDIO.H Get a character from stdin; 29 char tmp = 0; 30 cout<<endl<<endl<<"the function getchar():"<<endl; 31 cout<< (char)getchar(tmp) <<endl; 32 33 //getline(): 34 //basic_istream<Elem, Tr>& getline(char_type *_Str, streamsize _Count); 35 //Gets a line from the input stream. 36 cout<<endl<<endl<<"the function getline():"<<endl; 37 cin.getline(buffer,MAX_LEN); 38 cout<<buffer<<endl; 39 40 //getch(): 41 //This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant _getch instead 42 //Gets a character from the console without echo. 43 //int _getch( void ); 44 //Returns the character read. There is no error return. 45 //Headers: <conio.h> 46 cout<<endl<<endl<<"the function getch():"<<endl; 47 tmp = getch(); //without echo 48 // cout<<tmp<<endl; //print the character 49 50 51 system("pause"); 52 return 0; 53 54 }

            posted on 2010-09-10 08:44 馬賽克007 閱讀(1495) 評(píng)論(0)  編輯 收藏 引用

            <2010年9月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            導(dǎo)航

            統(tǒng)計(jì)

            公告

            QQ:306334649 本博客所發(fā)代碼皆為作者原創(chuàng),大家可以隨便使用。

            常用鏈接

            留言簿(1)

            隨筆檔案

            文章分類

            我的博客

            搜索

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            99久久无码一区人妻| 久久久无码精品午夜| 69国产成人综合久久精品| 久久精品国产亚洲AV无码偷窥| 色综合久久综合中文综合网| 久久综合香蕉国产蜜臀AV| 国产精品99久久久久久猫咪| 色婷婷久久综合中文久久一本| 99久久精品免费看国产一区二区三区| 久久青青草原亚洲av无码app| 国产精品熟女福利久久AV| 色婷婷综合久久久久中文一区二区| 99久久精品影院老鸭窝| 伊人久久无码精品中文字幕| 91精品国产色综合久久| 久久久www免费人成精品| 国产午夜精品理论片久久影视 | 国产一级做a爰片久久毛片| 色综合久久天天综线观看| 国产美女久久精品香蕉69| 国产精品久久久久久久久软件 | 久久男人Av资源网站无码软件| 国产激情久久久久影院小草| 人妻无码αv中文字幕久久琪琪布| 久久国产V一级毛多内射| 国产精品久久久久影视不卡| 2021国产精品久久精品| 性高湖久久久久久久久AAAAA| 久久精品国产秦先生| 久久久久高潮毛片免费全部播放| 久久久国产视频| 伊人久久五月天| 四虎国产精品成人免费久久| 精品人妻伦九区久久AAA片69| 久久99精品综合国产首页| 久久精品国产99久久无毒不卡 | 久久亚洲国产午夜精品理论片| 日本人妻丰满熟妇久久久久久| 蜜臀av性久久久久蜜臀aⅴ麻豆| 久久精品一本到99热免费| 亚洲中文字幕无码久久2020|