C++ Tab?????????????????
???????????? ???????[ 2014/3/27 10:07:49 ] ????????C++ Tab
??????????
?????????????д????????????????????ζ????У??????getline()?????????????α????????·?????????????????С?
?????????????鷳??д???tab????????????
?????????????????????????л?????????????????????????????ɡ?
????????????windows???????????
??????????????
????1.????????о???????????????в???????
#include<stdio.h>
#include<string>
#include<conio.h>
#include<map>
usingnamespacestd;
#include<windows.h>
#include<stdlib.h>
#include<wincon.h>
//tab????????????????????????
voidtab_find_char(std::map<int??char*>store_compare_??char*store_input??inti_store_input_count??int&tab_count);
//????????????????????????????????
char*get_attach(constchar*stacks_??constchar*needle_);
voidconsole_start();
voidconsole_end();
voidwrite(constchar*message??intlength);
voidwrite(constchar*message);
voidread(char*buffer??size_tsize);
#include<iostream>
#include"conio.h"
//?????????λ??
staticCOORDcurser_position;
voidmain()
{
console_start();
//??????????????????
staticstd::map<int??char*>store_compare;
store_compare[0]="thread_parameter_";
store_compare[1]="parameter_";
store_compare[2]="build";
store_compare[3]="compile";
intcount=0;
charch;
while(true)
{
inttab_count=0;
charstore_input[256];
inti_store_input_count=0;
//??????λ??
HANDLEhOut;
CONSOLE_SCREEN_BUFFER_INFObInfo;
hOut=GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hOut??&bInfo);
curser_position.X=bInfo.dwCursorPosition.X;
curser_position.Y=bInfo.dwCursorPosition.Y;
do
{
ch=(char)_getch();
if(ch!='
')
{
if(ch=='q')
{
break;
}
elseif(ch==9)
{
tab_find_char(store_compare??store_input??i_store_input_count??tab_count);
tab_count++;
}
//????????????????????????????
elseif((ch>=48&&ch<=57)||(ch>=65&&ch<=122))
{
char*temp_char=newchar[1];
temp_char[0]=ch;
write(temp_char??1);
store_input[i_store_input_count]=ch;
i_store_input_count++;
}
}
}
while(ch!='
');
write("
");
}
console_end();
}
voidtab_find_char(std::map<int??char*>store_compare_??char*store_input??inti_store_input_count??int&tab_count)
{
if(i_store_input_count<0||tab_count<0)
{
return;
}
intmap_size=store_compare_.size();
tab_count=tab_count%map_size;
i_store_input_count+=1;
store_input[i_store_input_count-1]='
主站蜘蛛池模板:
久草手机视频在线
|
午夜免费视频观看
|
色版视频在线观看
|
99re在线观看|
天天干干干干
|
日韩国产午夜一区二区三区
|
久久天天躁夜夜躁狠狠躁2020
|
中文字幕天天躁日日躁狠狠躁免费
|
欧美一级成人
|
无码一区二区三区视频
|
亚洲黄色影院
|
国产激情毛片
|
人人做人人澡人人人爽
|
免费被黄网站在观看
|
欧美日韩国产一区
|
国产禁女女网站免费看
|
伊人再现|
高清性色生活片免费视频软件
|
亚欧成人在线
|
日本三级香港三级人妇gg在线
|
毛片免费观看网址
|
免费羞羞网站视频
|
手机在线伦理片
|
国产成人高清精品免费观看
|
欧美一级片免费观看
|
国产好片无限资源
|
涩涩视频在线观看入口
|
成人在线免费网站
|
亚洲精品成人中文网
|
成人永久免费
|
国产精品免费大片一区二区
|
亚洲乱人伦精品图片
|
日韩精品视频一区二区三区
|
麻豆久久婷婷国产综合五月
|
中文字幕第315页
|
亚洲va欧美|
男女在线视频观看
|
色的视频在线观看免费播放
|
黄色网址免费
|
成人在线视频观看
|
久久人体|