The program has four files. utility.h just contains all the include statements, filer.h, filer.cpp has the code to make the file of random numbers, and test.cpp has the main function to test the code with the console input.View more random threads:
- adding rows and columns of a multi array in c++ 2011
- A partial specialization may inherit from an ordinary class
- we used single & and single | logical operator in...
- library dos.h in c++ 2011
- what means of cardinalities relationship plz explain me sir...
- Sorting code in c++
- What does hierarchy mean in concerned with Classes ?
- what is anonymous in c 2011
- Here is a chunk of code prototype of Library Managment...
- is there anything else like winzip wizard to run the...
Here is the application code.
Code:C++ Syntax (Toggle Plain Text) #include "utility.h" #include "filer.h" /*** Created by Andrew Smith on 8/25/11 This program tests the filer class by asking the user to define the number generation criteria. It prints the numbers to a file specified by the user ***/ using namespace std; int main(){ int num; int range; bool randNum; string fileName; filer file; //create new filer object //get file name cout << "File name?" << endl; cin >> fileName; //get how many numbers to generate cout << "How many number?" << endl; cin >> num; //get the range cout << "What is the range of numbers?" << endl; cin >> range; //random or pseudo random cout << "Random/Pseudo (true/false)" << endl; cin >> randNum; //make the file //file.makefile(num, range, rand, fileName); return 0; }
Sponsored Links
There are currently 1 users browsing this thread. (0 members and 1 guests)