# Decide how to define a method at runtime
class C
end
C.class_eval do
define_method :my_method do
'a dynamic method'
end
This file contains 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 <iostream> | |
using namespace std; | |
#define BYTE unsigned char | |
class Pixel{ | |
public: |