Commit 14f77226 authored by Charles Gerard's avatar Charles Gerard
Browse files

tweaks

parent ac993dc6
......@@ -15,12 +15,12 @@ int main(int argc, const char* argv[]) {
vector<char> holder; // holder stores the 6 possible characters: (, ), {, }, [, ]
bool isBalanced = true;
if (argc != 1) {
if (argc != 2) {
cout << "wrong length for argc, exiting" << endl;
return -1;
}
cout << "yo" << endl;
string filename = argv[0];
string filename = argv[1];
cout << "filename: " << filename << endl;
ifstream ifs(filename);
ifs.open(filename);
......@@ -78,6 +78,8 @@ int main(int argc, const char* argv[]) {
}
}
ifs.close();
if (isBalanced) {
cout << "Balanced\n";
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment