Hello all just wrote a basic program that's main purpose is too take in information for said account and display it back to you.
Code:
#include <iostream>
#include <windows.h>
#include <stdio.h>
#include <string>
class Account
{
public:
std::string name, pin;
void Register()
{
std::cout << "Please enter you're name: " << std::endl << std::endl;
std::getline(std::cin, name);
std::cout << "Please enter a pin: " << std::endl;
std::getline(std::cin, pin);
system("cls");
std::cout << "Thank you for registering " << name << std::endl;
Sleep(2000);
std::cout << "Please wait a moment while we take you to you're account " << std::endl;
Sleep(7000);
Login();
}
void Login()
{
std::cout << "Account information: " << std::endl << std::endl;
std::cout << "Name : " << name << std::endl;
std::cout << "Pin : " << pin << std::endl;
Sleep(3000);
std::cout << "Thank you for testing this system" << std::endl;
std::cout << "goodbye " << std::endl;
Sleep(1000);
}
};
int main()
{
std::cout << "Hello welcome!" << std::endl << std::endl;
Account accountobject;
accountobject.Register();
return 0;
}
Nice. I made a similar program for my Intro to Programming class. Only difference was that it was in VB. I have the file somewhere and will try to remember to post it here for ya so that you could take a few things from it. For example, I made a form/screen where it had 2 text fields (Username, Password) and a (Login) button. When password was entered, it replaced the characters with dots. I stopped working on it, but I was going to add a storing feature to it, where the user would be able to click Remember Me and not input everything again. Also was working on making the thing more secure, since you could easily extract the username/password from it at the time. lol
Originally Posted by D3v17Dy7
Pretty sure this is bad practice.
It is, that never stopped a beginner from using it though :\
Nice Work! Keep Going!
Is this your first program?
Pretty neat,Nice work
Originally Posted by Hell_Demon
It is, that never stopped a beginner from using it though :\
Yeah I used it when I was a beginner, I'm complaining that people are trying to tell someone not using it to use it.
Originally Posted by D3v17Dy7
Pretty sure this is bad practice.
?
he didn't use using namespace std so he has to use std::, otherwise he'd get an undeclared identifier error c2065 I believe.