til my /usr/include/ has a json lib

master
ieee 802.11ac 2 years ago
parent d36c909b87
commit 8d9f8ab40e

@ -4,16 +4,17 @@ behold! my garbage code. (and other people's better code but whatever)
#include <iostream>
#include <sys/ioctl.h>
#include <string.h>
#include <json/json.h>
#ifdef __linux__
std::string defaultPath = "$HOME/.config/factorioclone";
const char* defaultPath = "$HOME/.config/factorioclone";
#endif
#ifdef __WIN32__
#include <windows.h>
char* defaultPath = getenv("APPDATA");
#endif
std::string filename = "main";
const char* filename = "main";
int main(int argc, char **argv)
{
@ -26,8 +27,8 @@ int main(int argc, char **argv)
if (argc==1) {
std::cout << "no arguments :(" << std::endl;
} else {
std::cout << argc-1 << " arguments" << std::endl;
for (int i = 1; i < argc; i++) {
std::cout << argc-1 << " arguments" << std::endl;
char* arg = argv[i];
if (!strcmp(arg, "--help")) {
std::cout << "this is a factorio clone that runs in the terminal. it is shit. shoutouts to dragon lord for thinking up the name \"beaurocra-tech\"" << std::endl;

Loading…
Cancel
Save