Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 27th, 2006, 03:25 AM
key9
Guest
 
Posts: n/a
Default basic stream confuse.(charset level).

Hi All

Scene:

I am making a toy for myself. with a "serial port" to control.
A console based program running on pc control it.(under c++)
On design, I met these c++ problem:


1.Is there anyway to read some combination-key like "ctrl+p"
"ctrl+shift+alt+k" on std::cin (directly/undirectly)?

2.when I hit "return" , I don't want a "eof" , I just need deal it as a
general key. How, on std::istream?

3.In unix , after I get a "fd"(a serial port, or a socket, maybe)
successful, I "listen" on it use a thread.
Can I treated every inputs as a "law integer"(I means, under mechanism
"std iostream")
(no these flags when met "eof" or something else?)
....

So I think I need a sample code something like "telnet server & client"
under c++.
I google it, almost all of them write under c.

Sorry for my knowledge,either c,or c++,also unix, I can not rewrite them.



My questions:

Q1: Is that source code exist? Better use mechanism "std iostream".

If !Q1,

Q2: where I can find these "charset" knowledge so I can treated everything
as "law integer"?
(the experience on MCU make me treated every thing as a scancode.)

Q3: what's more "c++" knowledge should I have to know ,when I want to
realize such a toy control program ???


New beginner.came from MCU.
Anyone be kindness to make me cut in fast?


your
key9.


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles