Created
May 19, 2019 11:52
-
-
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++
This file contains hidden or 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
#include <store.h> | |
#include <iostream> | |
int main() { | |
cout << Store.name << endl; | |
Store.name = "Isaac"; | |
cout << Store.name << endl; | |
} |
This file contains hidden or 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
#include <string> | |
#include <store.h> | |
std::string Get() { | |
Store.name = "Lucie"; | |
return "<the string>"; | |
} |
This file contains hidden or 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
#include <store.h> | |
#include <string> | |
typedef struct Store { | |
std::string name = "Jacob"; | |
}; |
This file contains hidden or 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
#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