•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,519 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,821 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 2073 | Replies: 3
![]() |
•
•
Join Date: Jul 2004
Posts: 64
Reputation:
Rep Power: 5
Solved Threads: 0
for a simple program...
#include <iostream>
using namespace std;
int main()
{int x;
cout << "enter password\n";
cin >> x;
return 0;
}
for the pink colour part..
if i want my password to be in integer and alphabets, so what command line should i put?
and when i enter a password... i want it to reveal the code in this form "*****". How should i do that?
#include <iostream>
using namespace std;
int main()
{int x;
cout << "enter password\n";
cin >> x;
return 0;
}
for the pink colour part..
if i want my password to be in integer and alphabets, so what command line should i put?
and when i enter a password... i want it to reveal the code in this form "*****". How should i do that?
•
•
Join Date: Aug 2004
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by koh
for a simple program...
#include <iostream>
using namespace std;
int main()
{int x;
cout << "enter password\n";
cin >> x;
return 0;
}
for the pink colour part..
if i want my password to be in integer and alphabets, so what command line should i put?
and when i enter a password... i want it to reveal the code in this form "*****". How should i do that?
•
•
Join Date: Aug 2004
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
instead of int use char for entering both int and char data. and u can do this very easily.
#include <iostream>
using namespace std;1
int main()
{
char c,str[20];
int i=0;
while((c =getch())!='\n') {
str[i]=c;
putch('*');
}
}
this program catches the text u type either in int or char. and will be stored in str. each time after accepting the character it will display '*' to hide the characters entered.
#include <iostream>
using namespace std;1
int main()
{
char c,str[20];
int i=0;
while((c =getch())!='\n') {
str[i]=c;
putch('*');
}
}
this program catches the text u type either in int or char. and will be stored in str. each time after accepting the character it will display '*' to hide the characters entered.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Dynamic Initialization implies Dynamic Help (C++)
- msurl.exe DLL Initialization failed (Viruses, Spyware and other Nasties)
- Helping for initialization (C++)
- Trouble with "Helping yourself" (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: C++ Division Remainder Help
- Next Thread: Using Resources in Visual C++


Linear Mode