Skip to content

Instantly share code, notes, and snippets.

View nikhedonia's full-sized avatar
💭
actively open-sourcing

Gaetano Checinski nikhedonia

💭
actively open-sourcing
View GitHub Profile
struct Texture {
  Texture(string const& path) { cout << "Texture loaded from " << path << endl; }
 ~Texture() { cout<< "Texture destroyed" << endl; }
 
  static shared_ptr<Texture> load(string const& path) {
  return make_shared<Texture>(path)
  }
};
// this functions will take a copy and increment the counter
// Jyt is a REPL for C++
// You can write code interactively
// Highlight some code and press alt-enter to execute it
// For example:
auto x = "hello world";
// Now you can query the value in the terminal on the right
// e.g. "x"