diff --git a/src/main.cpp b/src/main.cpp index 3ba5912..ea7d61a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,15 @@ #include +#include + using namespace std; -int main() { - cout << "VM Translator"; +int main(int argc, char *argv[]) +{ + string path = argv[1]; + + Parser parser(path); + + parser.printFile(); return 0; } \ No newline at end of file diff --git a/src/parser.h b/src/parser.h new file mode 100644 index 0000000..8898de9 --- /dev/null +++ b/src/parser.h @@ -0,0 +1,27 @@ +#include +#include +#include + +using namespace std; + +class Parser +{ +private: + ifstream file; + +public: + Parser(string path) + { + file = ifstream(path); + } + + void printFile() + { + string text; + + while (getline(file, text)) + { + cout << text; + } + } +};