Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > feedback on code design

Reply
Thread Tools

feedback on code design

 
 
krastavicakrastavica@abv.bg
Guest
Posts: n/a
 
      06-06-2012
Guys please, i only need answer on, what you do when you need a
function such as getch() or similliar that is part of conio.h or non-
standart header, and you really need it. Would you code similliar
function on your own or what would you do?
Thanks
 
Reply With Quote
 
 
 
 
Jorgen Grahn
Guest
Posts: n/a
 
      06-06-2012
On Tue, 2012-06-05, wrote:
> I read its bad to use conio.h, and i use getch() from that header. If
> i have a new project that needs such function, is it good i to write
> it on my own? What would the mass of programmers do?


Please don't:
- jump into a thread with a new, completely unrelated question
- ... without changing the subject
- post the same question many times (this one appeared in at least
one other thread I'm reading)

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
 
 
 
nick_keighley_nospam@hotmail.com
Guest
Posts: n/a
 
      06-07-2012
On Wednesday, June 6, 2012 3:06:01 PM UTC+1, (unknown) wrote:

> Guys please, i only need answer on, what you do when you need a
> function such as getch() or similliar that is part of conio.h or non-
> standart header, and you really need it. Would you code similliar
> function on your own or what would you do?
> Thanks


if you need it then you use conio.h. I'd probably hide it behind some OS specific library. Maybe even rename it. Hopefully then moving to another would only require changes in a few places.

 
Reply With Quote
 
Nobody
Guest
Posts: n/a
 
      06-07-2012
On Wed, 06 Jun 2012 07:06:01 -0700, krastavicakrastavica wrote:

> Guys please, i only need answer on, what you do when you need a function
> such as getch() or similliar that is part of conio.h or non- standart
> header, and you really need it. Would you code similliar function on your
> own or what would you do? Thanks


Use the curses API. There are implementations for all of the common
platforms. Unix versions use control codes and escape sequences from the
terminfo database, the Windows version uses the Windows console API. You
can use a Unix version on Windows if you want to talk to a terminal or
terminal emulator (either via serial or network) rather than a Windows
console.

 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: feedback on code design Tobias Müller C++ 0 06-03-2012 08:44 AM
Feedback on my design and how to use DCI Design Pattern? josh Ruby 5 12-27-2011 10:31 AM
Feedback from feedback on MCP questions Matt Adamson Microsoft Certification 0 04-27-2009 11:13 AM
Feedback appreciated for a new design I am working on. Chaddy2222 HTML 15 06-06-2006 04:38 AM
Attn: Application Architects... Design Question... please give me your feedback... alien2_51 ASP .Net 8 07-16-2003 09:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57