Created
July 1, 2010 15:26
-
-
Save zuigon/460108 to your computer and use it in GitHub Desktop.
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
require "rubygems" | |
require 'inline' | |
class Test1 | |
inline(:C) do |builder| | |
builder.include '<iostream>' | |
builder.add_compile_flags '-x c++', '-lstdc++' | |
builder.c ' | |
using namespace std; | |
void zbroji(int a, int b){ | |
cout << (a+b) << endl; | |
}' | |
end | |
end | |
t = Test1.new() | |
t.zbroji(2, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment