Skip to content

Instantly share code, notes, and snippets.

@J-Cake
Created May 19, 2019 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J-Cake/f840e0417c53d103605c7b49d174d832 to your computer and use it in GitHub Desktop.
Save J-Cake/f840e0417c53d103605c7b49d174d832 to your computer and use it in GitHub Desktop.
A simplified demonstration of what I'm trying to achieve in C++
#include <store.h>
#include <iostream>
int main() {
cout << Store.name << endl;
Store.name = "Isaac";
cout << Store.name << endl;
}
#include <string>
#include <store.h>
std::string Get() {
Store.name = "Lucie";
return "<the string>";
}
#include <store.h>
#include <string>
typedef struct Store {
std::string name = "Jacob";
};
#include <string>
extern typedef struct {
std::string name;
} Store;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment