You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I've been working on cleaning up the main, and I've gotten to a point where I used functional programming, which bypasses the need to overload a function a billion times. The function replaces the loops that get and check input from cin.
Here's an example of a call to the function:
//check input username against data
getCheckedInput("Please enter your username.\n",
user,
INCLUDE, bind(&HashTable<User*>::inSet, Data, placeholders::_1), // Is user in the HashTable?
"I'm sorry, that username is not found in our data banks. Please try again...\n\n");
As you can see, it's pretty readable except for the line I put a comment on (which will be different most of the time), but you wouldn't be able to write it unless you learn some programming or called me over to do it. Should I continue or go back to function overloading?
The text was updated successfully, but these errors were encountered:
So, I've been working on cleaning up the main, and I've gotten to a point where I used functional programming, which bypasses the need to overload a function a billion times. The function replaces the loops that get and check input from cin.
Here's an example of a call to the function:
//check input username against data
As you can see, it's pretty readable except for the line I put a comment on (which will be different most of the time), but you wouldn't be able to write it unless you learn some programming or called me over to do it. Should I continue or go back to function overloading?
The text was updated successfully, but these errors were encountered: