Hi guys (:
I'm kinda new to C++ , just started today so bare with me d;
I made a Calculator from a tutorial, and after that i used my knowledge of python and normal logic to write this piece of code.
#include <string>
#include <iostream>
using namespace std;
int main()
{
string lBrugerNavn, lPassword;
cout << "Brugernavn: ";
cin >> lBrugerNavn;
cout << endl;
cout << "Password: ";
cin >> lPassword;
if (lBrugerNavn == "Jokke"
&& lPassword == "1234")
{
system("CLS");
menu();
}
else
{
cout << "Bad Logon. Try again!" << endl;
system("CLS");
main();
}
cin.get();
cin.get();
}
int menu()
{
string lBrugerNavn, Choice;
cout << "Welcome" << lBrugerNavn;
cout << endl;
cout << endl;
cout <<"1 - Calculator" << endl;
cout << endl;
cout <<"2 - Random Option" << endl;
cout << endl;
cout <<"3 - Random Option" << endl;
cout << endl;
cout <<"4 - Random Option" << endl;
cout << endl;
cin >> Choice;
if (Choice == 1)
claculator();
else if (Choice == 2)
randomoption();
}
int calculator()
{
}
I know that the top part is working, but my problem is "Calling" the "Menu" after login passed.
i dont really know if my menu is gonna work yet, cos i cant relly test it before getting the "Calling" working d:
I hope there is somebody out there with a fix, i'm on a steep learning curve here :D