1: //TestStuff20140917.cpp
2: //Wednesday, September 17, 2014
3:
4: //Note: This program needs funtions.h and functions.cpp to run.
5:
6: #include <iostream> //this is where cout, endl and cin.ignore() live
7: #include <fstream> //this is where ifstream and ofstream live
8: #include <string> //this is where getline() and to_string() live
9: #include <cstdlib> //this is where atoi() lives
10: using namespace std; //<- This is a "using directive"
11:
12: #include "utilities.h"
13: using Scobey::DisplayOpeningScreen;
14: using Scobey::Pause;
15: using Scobey::TextItems;
16:
17: #include "functions.h"
18:
19: int main(int argc, char* argv[])
20: {
21: if (argc == 1)
22: {
23: DisplayOpeningScreen("Scobey:Porter:A00123456:csc34101",
24: "Submission 02: Encoding and Decoding Plain-Text Messages");
25: const TextItems TEXT("encode_decode.txt");
26: TEXT.displayItem("ProgramDescription");
27: return EXIT_SUCCESS;
28: }
29:
30: //cout << "Carrying on ... " << endl;
31: //Pause();
32:
33: Pause(0, "Carrying on ...", 1);
34: Pause(0, "Still carrying on ...", 2);
35:
36: //int i;
37: //int j;
38: //GetTwoValuesFromUser(i, j);
39: //DisplayValues(i, j);
40:
41: //cout << argv[2] << endl;
42: ////cout << argv[2] + 1 << endl; //pointer: will discuss much later!
43:
44: //cout << atoi(argv[2]) + 1 << endl;
45: //string s = "789";
46: //cout << s << endl;
47: //string s1("357");
48: //cout << s1 << endl;
49: //string s2 = argv[2];
50: //cout << s2 << endl;
51: ////cout << atoi(s2) << endl; //doesn't work
52: //cout << stoi(s2)+1 << endl;
53: ////cout << argv[1] + argv[2] << endl;
54: //cout << s2 + s1 << endl;
55: //cout << s2 + 'a' << endl;
56: }