system("-echo raw")

This is a discussion on system("-echo raw") within the C++ Programming forums, part of the General Programming Boards category; Is there a real way of achieving this? I want to make the program more portable. If there isn't, what's ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    25

    system("-echo raw")

    Is there a real way of achieving this? I want to make the program more portable. If there isn't, what's the windows implementation?

  2. #2
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    Sorry, what this code is supposed to do?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    25
    Read in a character from cin without echoing it or waiting for eof.

    I have implemented it with conio.h, but i'd much rather an ANSI way if there is one.

  4. #4
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,231
    You mean it is getch()?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    There is no standard way to do that. The stuff in conio or some other platform specific code will have to do.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    This sort of operation is definitely dependant on the OS, so you won't be able to implement it completely OS independent - you could of course implement two different functions [choosing which or choosing to compile only one based on some architecture identifying define or such] or use someone elses already implemented third party function/library that solves this problem.

    --
    Mats

  7. #7
    Registered User
    Join Date
    Aug 2007
    Posts
    25
    Cool, I think I'll just have a unix version and a windows version. Use whichever one is relevant.

  8. #8

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Directories and files using dirent.h
    By totalnewbie in forum C Programming
    Replies: 6
    Last Post: 11-19-2008, 04:10 PM
  2. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  3. A breakthrough
    By loopy in forum Linux Programming
    Replies: 4
    Last Post: 11-26-2003, 05:46 PM
  4. C-Shell Scripting.. Help!
    By denizengt in forum Tech Board
    Replies: 3
    Last Post: 10-29-2003, 12:37 PM
  5. echo command
    By Billing in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 08-31-2001, 08:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21