Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters > C/C++
Register

Reply
 
LinkBack Thread Tools
Old 12.06.2007, 18:24   #1
Младенец
 
Wizard2's Avatar
 
Join Date: 06 2007
Location: Abovyan
Posts: 9
Downloads: 2
Uploads: 0
Reputation: 0 | 0
Default C++ wonc mutqagrem 1 hat char ?

Barew żoxowurd. mi harc unem jete karaq kxndrei ogneq. uremn grelem program, entex ka char ch; u inch anumem chem karum nenc apahowem wor pragrami ogtagorcman żamanak hankarc jete klient@ sexmi woch te 1 hat klawish ajl asenq blomblom u tenc xar@ baner,pragram@ eti @nduni worpes sxal u hajtarari. wonc anumem orinak

PHP Code:
char ch;
cin.get(ch);
// u stex amen inch porcelem cin.ignore(amen dzewerow,'\n')

while(isalpha(ch))
{
//gorcoxutjun
}
cout<<" awartwace, mersi "
u wonc anumem senc jhfguaygfy xar@ baner sxmeluc inq@ amen char-i hamar ashxatuma.indz petqa wor asi eti sxala. Inch xorhurd ktaq wonc anem, karoxa sxal@ urish bani mecha. kompilatrs DEV C++ 4.9.9.2.
__________________
http://www.danasoft.com/sig/Agas.jpg
у вас проблема с английским нет проблем
BINGO!!!
Reply With Quote
Old 12.06.2007, 19:08   #2
The splendid
 
AvDav's Avatar
 
Join Date: 07 2004
Location: Pure thoughts
Age: 36
Posts: 3,408
Downloads: 22
Uploads: 0
Reputation: 222 | 3
Default

du el char mi karda, string karda ... ete 1 simvolic avela nshanakuma qo uza&ic chi..te vonc?
Reply With Quote
Old 12.06.2007, 20:15   #3
Младенец
 
Wizard2's Avatar
 
Join Date: 06 2007
Location: Abovyan
Posts: 9
Downloads: 2
Uploads: 0
Reputation: 0 | 0
Default

che , asumem jes nencem grel wor 1 tar sexmi u @st et tari menun ashxati , bajc wonc anem wor hankarc mi axmax mard sxalwi kamel ditaworjal porcelu hamar sexmi mi qani tar , menun chbaci , asi sxala. hima wor porcumem asenq menuji mech ka a,b,c,d,e, che?, wor sexmem ghyugzxacstdfyhd bolor tareri hamar asxatuma. te petqa arandzin if-ow pajman dnem ?.
Reply With Quote
Old 12.06.2007, 20:47   #4
The splendid
 
AvDav's Avatar
 
Join Date: 07 2004
Location: Pure thoughts
Age: 36
Posts: 3,408
Downloads: 22
Uploads: 0
Reputation: 222 | 3
Default

de ete menun pti bacvi a,b,c,d,e-neri depqum if-ov stugi - te dranq en, menu bac, te che - mi bac.
Reply With Quote
Old 12.06.2007, 20:54   #5
Младенец
 
Wizard2's Avatar
 
Join Date: 06 2007
Location: Abovyan
Posts: 9
Downloads: 2
Uploads: 0
Reputation: 0 | 0
Default

de jes mtacumei wor ifstream@ inchwor mi tenc metod kunena.. u jerewi uni. amen depqum mersi AvDav dzan.
Reply With Quote
Old 12.06.2007, 22:18   #6
инсценирующи
 
[ Xelgen ]'s Avatar
 
Join Date: 07 2002
Location: Fireplace of Ecotopia
Age: 31
Posts: 4,327
Downloads: 22
Uploads: 0
Reputation: 193 | 4
Default

Keyboard input scan ara, ete hot-key'i nman ban es uzum sarqes.
Reply With Quote
Old 13.06.2007, 08:22   #7
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

Ввод одного символа без ввода энтера сделать не так просто. Под видны для этой цели я использую консольные функции. Соответственно при вводе "дсадса" срабатывает обработчик по очереди для каждой клавиши.
Reply With Quote
Old 13.06.2007, 12:43   #8
Младенец
 
Wizard2's Avatar
 
Join Date: 06 2007
Location: Abovyan
Posts: 9
Downloads: 2
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by Agregat View Post
Ввод одного символа без ввода энтера сделать не так просто. Под видны для этой цели я использую консольные функции. .
Isk aweli konkret ,wor xndrem karas mi hat poqr orinak gres? asenq mjacnes werewi kodi mech.

dzewer shat kan , bajc C++@ en lezuna wor tenc baneri hamar moma,amen inch ptiwor unena.karelija int-ow kardal principi che ?, uxxaki paxnel problemic chi nshanakum hamarel ajn lucwac, dra hamar hetaqrqirer imanal u gtnel lucum@.
Reply With Quote
Old 13.06.2007, 13:04   #9
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

PHP Code:
HANDLE hInput = ::GetStdHandle(STD_INPUT_HANDLE);    
DWORD mode 0;
::
GetConsoleMode(hInput, &mode);
mode &= ~(ENABLE_LINE_INPUT ENABLE_ECHO_INPUT ENABLE_WINDOW_INPUT ENABLE_MOUSE_INPUT);
::
SetConsoleMode(hInputmode);
................
if (
_kbhit())
{
   
//read the next char
   
char read = ::_getch_nolock();

Reply With Quote
Old 13.06.2007, 15:01   #10
Младенец
 
Wizard2's Avatar
 
Join Date: 06 2007
Location: Abovyan
Posts: 9
Downloads: 2
Uploads: 0
Reputation: 0 | 0
Default

shat shat mersi gta. aweli konkret
while(isalpha(ch=gethar()))
cin.ignore(INT_MAX,'\n');

Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 02:47.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.