a gleam implementation of a CS assignment originally written in cpp

feat: ask the user for input

Changed files
+17 -6
src
+17 -6
src/lab66.cpp
···
ifstream OT;
string filename = "../test/OT.txt";
+
string book;
+
int chapter;
+
int verse;
// get path to OT.txt if provided otherwise use default path
if (argc == 2) {
···
return 1;
}
-
string verse;
-
getline(OT, verse);
-
getline(OT, verse);
-
getline(OT, verse);
-
getline(OT, verse);
+
cout << "Please enter the reference of the verse you would like" << endl;
+
+
cout << "the book: ";
+
getline(cin, book);
+
cout << endl;
+
+
cout << "the chapter: ";
+
cin >> chapter;
+
cout << endl;
+
+
cout << "the verse: ";
+
cin >> verse;
+
cout << endl;
-
cout << verse;
+
cout << book << " " << chapter << ":" << verse;
OT.close();