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,106 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,334 01-04-2012, 10:28 PM
Last Post: Vuhelper
  Balance of the AVL tree im Data structure 2012 Vuhelper 0 1,903 01-04-2012, 10:27 PM
Last Post: Vuhelper
  array project code c++ 2011 Vuhelper 0 1,280 12-10-2011, 06:32 PM
Last Post: Vuhelper
  factorial in C++ code 2011 Vuhelper 0 955 12-10-2011, 06:31 PM
Last Post: Vuhelper
  why we use queues data structure for level order traverse? Vuhelper 0 2,468 11-05-2011, 05:26 PM
Last Post: Vuhelper
  Linklist Data Structure Vuhelper 0 1,900 11-05-2011, 05:11 PM
Last Post: Vuhelper
  stack during function call in C++ 2011 Vuhelper 0 2,032 11-05-2011, 05:05 PM
Last Post: Vuhelper
  What is the Thing Queue? in c++ 2011 Vuhelper 0 1,787 11-05-2011, 05:02 PM
Last Post: Vuhelper
  ASCII to char conversion code in C++ 2011 Vuhelper 0 1,727 11-05-2011, 05:01 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)