Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 9th, 2008, 12:58 AM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accepting Passwords in C++

The general way to accept passwords is to print a special character conventionally a '*' in the foreground while we store the actual character in the background.

I have done this in a TC compiler with the help of getch() function.

Under GCC, I found that the function getch() is supported by curses.h instead of stdio.h as in a TC compiler.

But when I have tried out a simple program as follows, the program gives few errors when compiled

#include<stdio.h>
#include<curses.h>

int main()
{
    int c = getch();
    return 0;
}

Could you please tell me what the problem might be and the way to solve it.

Thanks in advance.

Mandriva Rocks
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
checkpassword control new password not accepting aruni_cbe ASP.NET 2.0 Professional 4 December 7th, 2010 02:35 AM
Accepting Connections js_newbie Linux 0 April 25th, 2007 05:29 AM
Accepting time input GuyB ASP.NET 1.0 and 1.1 Basics 0 May 11th, 2006 06:57 PM
Report not accepting the condition ceema Crystal Reports 0 March 29th, 2006 12:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.