Hey everyone, i have a question....... My code is saying too many arguments to function .....in dev c++.............i am not thr | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hey everyone, i have a question....... My code is saying too many arguments to function .....in dev c++.............i am not thr

#include <iostream> #include <string> #include <fstream> using namespace std; void page1(); void page2(); void admin(); void user2(); void adverts(); void newUser(); bool access(); void deposit(); bool withdraw(); void showBalance(); int main() { page1(); return 0; } void page1(){ int option; cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<< endl; cout << " WELCOME TO "<< endl; cout << " MBUGUA'S BANK " << endl; cout << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" << endl; cout << " " << endl; cout << " 1. Continue " << endl; cout << " 2. Adverts " << endl; cout << " " << endl; cout << " Press 1 or 2 " << endl; cin >> option; while (option < 0 || option > 3) { cout << "invalid choice. Please try again " << endl; cin >> option; } switch(option){ case 1: page2(); break; case 2: adverts(); break; default : cout << " Wrong option" << endl; break; } } void page2(){ int option; cout << "\t Welcome " << endl; cout << " 1. Normal User login " << endl; cout << " 2. Administrator login " << endl; cout << " " << endl; cout << " Choose an option to proceed " << endl; cin >> option; switch(option){ case 1: int option; string username, password; cout << " Welcome back "<< endl; cout << " " << endl; cout << " Enter username and password" << endl; cout << " username : " ; cin >> username; cout << " password : "; cin >> password; if (access (username, password)) { cout << " log in success " << username << endl; user2(); return; } else { cout << " Failed to log in" << endl; } break; case 2: admin(); break; default : cout << " Wrong option" << endl; break; } } void admin(){ int option; string user, pass; string username, password; c

19th Jul 2020, 3:02 PM
Mosay Blacks
1 Answer
0
Hello Mosay Blacks Welcome to SoloLearn! I see you've just joined in shortly, so I guess this is your first time. Please notice that your code is truncated, that is because thread Description has character limit and your code is too big to fit in. I suggest you to save a copy of the code in SoloLearn, and then share the saved code link in the thread Description (delete the raw text code first). This way you can evade the limits, and others appreciate it cause editing and checking ssved code is less hassling and comfortable (no need to copy paste first) before they can test things up. Follow the below guide to sharing the code link, and a few notable tips for posting a question after ... Good luck! 👍 https://www.sololearn.com/post/75089/?ref=app https://www.sololearn.com/Discuss/333866/?ref=app
19th Jul 2020, 3:34 PM
Ipang