Read file passed through argv[]
This commit is contained in:
14
src/main.cpp
14
src/main.cpp
@ -1,5 +1,15 @@
|
||||
#include "lex.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
int main(int argc, char **argv) {
|
||||
if (argc != 2) {
|
||||
std::cout << "Usage: bfuck <IN-PATH>" << std::endl;
|
||||
}
|
||||
std::cout << "Running " << argv[1] << "...\n" << std::endl;
|
||||
|
||||
std::string tokens;
|
||||
lex_brainfuck_file(argv[1], tokens);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user