blob: 92b1f7e7d0f54d8a5250a3f7cac1fdcd15bcef56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
// BlankConsoleLab.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <fstream> // For the files!!!!
#include <iomanip> // For manipulators & formatting options
using std::cin;
using std::cout;
using std::endl;
using std::setw;
using std::ios;
using std::ifstream;
using std::ofstream;
int size = 5;
int arr[50];
int choice = 0;
void filechoice()
{
cout << " Which record would you like to open? Small or Large? \n 1 is large, 2 is Small" << endl;
cin >> choice;
}
void largetext()
{
ifstream inFile;
if (choice = 1) {
ofstream outFile("C:\\TEMP\\large.txt");
inFile.open("C:\\TEMP\\large.txt");
}
}
void smalltext()
{
ifstream inFile;
if (choice = 2) {
ofstream outFile("C:\\TEMP\\small.txt");
inFile.open("C:\\TEMP\\small.txt");
}
}
int main()
{
filechoice();
largetext();
smalltext();
return 0;
}
|