Member Avatar for kohkohkoh

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?

Recommended Answers

All 2 Replies

>and when i enter a password... i want it to reveal the code in this form "*****". How should i do that?

A C example (second snippet).

have you tried declairing your "x" as a char instead of int?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.