No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have been writing a program that accesses data via a text file. I have recently been turned on to MySql which seems like it would be a more efficient way of organizing my data. If I am using Visual Studios to create both my database and my C++ program … |
|
The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 5 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character … |
|
The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 4 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character … |
|
[CODE]#include <iostream> #include <windows.h> #include <fstream> #include <string> #include <ctime> #include <vector> using namespace std; bool fileCheck(const char *filename) { ifstream ifile("item.txt"); return ifile; } int show(int p) { srand( time(NULL) ); int random_integer; random_integer = ( rand ( ) % p ) + 1; return random_integer; } int main … |
|
The first part inside the "If" statement works perfectly. The only part I am having trouble with is the "else" statement. I was trying to get it to generate an "x" amount of passwords and get those passwords to be at a length defined by the user. The problem is … |