Skip to content

Instantly share code, notes, and snippets.

@dketov
Created January 10, 2022 12:09
Show Gist options
  • Save dketov/3b9b57cf9f7cf860db3c35af2546eb6f to your computer and use it in GitHub Desktop.
Save dketov/3b9b57cf9f7cf860db3c35af2546eb6f to your computer and use it in GitHub Desktop.
#include <cstdio>
class Node
{
public:
virtual ~Node() {}
virtual void print() { printf("in Node\n"); }
};
class HTMLObjectElement: public Node
{
public:
virtual void print() { printf("in HTMLObjectElement\n"); }
};
static void getNodeInfo(Node node) {
node.print();
}
int main(int argc, char* argv[]) {
HTMLObjectElement node;
getNodeInfo(node);
return 0;
}
void X(char* x, char *y) {
while(*x++ = *y++);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment