-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#ifndef GAMELOG_H_INCLUDE | ||
#define GAMELOG_H_INCLUDE | ||
|
||
#include <string> | ||
|
||
namespace gl { | ||
int Foo(int x); | ||
} | ||
|
||
void Parse(std::string const& file_name); | ||
|
||
} // namespace gl | ||
|
||
#endif /* ifndef GAMELOG_H_INCLUDE */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#include <string> | ||
|
||
#include "gamelog/gamelog.h" | ||
|
||
namespace gl { | ||
|
||
int Foo(int x) | ||
{ | ||
return 2 * x; | ||
} | ||
void Parse(std::string const& ) {} | ||
|
||
} | ||
} // namespace gl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
#include <iostream> | ||
|
||
#include "gamelog/gamelog.h" | ||
|
||
int main() | ||
int main(int argc, char* const* argv) | ||
{ | ||
int x = gl::Foo(2); | ||
return x; | ||
if (argc != 2) | ||
{ | ||
std::cout << "This executabel takes exactly one argument.\n"; | ||
std::cout << "Usage: file_parser FILE_PATH\n"; | ||
return 0; | ||
} | ||
|
||
gl::Parse(argv[1]); | ||
|
||
return 0; | ||
} |