Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boolean data problem in c++ 2011-12
#1
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.

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; }

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Abstract data type (ADT) in C++ 2012 Vuhelper 0 7,104 01-04-2012, 10:34 PM
Last Post: Vuhelper
  call by value, call by reference,call by pointer in data structure 2012 Vuhelper 0 4,333 01-04-2012, 10:28 PM
Last Post: Vuhelper
  Balance of the AVL tree im Data structure 2012 Vuhelper 0 1,901 01-04-2012, 10:27 PM
Last Post: Vuhelper
  array project code c++ 2011 Vuhelper 0 1,274 12-10-2011, 06:32 PM
Last Post: Vuhelper
  factorial in C++ code 2011 Vuhelper 0 945 12-10-2011, 06:31 PM
Last Post: Vuhelper
  why we use queues data structure for level order traverse? Vuhelper 0 2,465 11-05-2011, 05:26 PM
Last Post: Vuhelper
  Linklist Data Structure Vuhelper 0 1,896 11-05-2011, 05:11 PM
Last Post: Vuhelper
  stack during function call in C++ 2011 Vuhelper 0 2,027 11-05-2011, 05:05 PM
Last Post: Vuhelper
  What is the Thing Queue? in c++ 2011 Vuhelper 0 1,785 11-05-2011, 05:02 PM
Last Post: Vuhelper
  ASCII to char conversion code in C++ 2011 Vuhelper 0 1,721 11-05-2011, 05:01 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)