Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- using namespace std;
- #include "ArrayIntStorage.h"
- int main(int argc, char **argv) {
- ifstream fin1("ACW2_data.txt");
- ofstream out1("1-arrayUnsortedRead.txt");
- ofstream out2("2-arrayUnsortedRead-thenSTDSort.txt");
- if(!fin1.is_open())
- {
- cout << "FAIL" << endl;
- return 1;
- }
- ArrayIntStorage arrayStorage1;
- arrayStorage1.setReadSort(false); // do not read sort
- // read in int values into data structure
- fin1 >> arrayStorage1;
- // output int values in data structure to file
- out1 << arrayStorage1;
- // sort data structure using std
- arrayStorage1.sortStd();
- // output int values in data structure to file
- out2 << arrayStorage1;
- fin1.close();
- out1.close();
- out2.close();
- gcc -o myprog myprog.c abc.o -L/path/to/libs -lxyz
Add Comment
Please, Sign In to add comment