Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
c++ wrapper
#1
what is this c++ wrapper i keep looking at for using C++ Header library's in freebasic?
t is better to error on the side of caution
than the side of haste!!!
[Image: title3.jpg]
Reply
#2
Quote:what is this c++ wrapper i keep looking at for using C++ Header library's in freebasic?
I haven't heard of it.

There's the GCC frontend which should allow us to use C++ stuff, and other things from just about every other modern programming language AFAIK (Or maybe it's just that anything not written in C is usually written in C++ or ASM lolz)... Someone FBC smart please banish me to hell for my mistakes in this paragraph.
Reply
#3
to use c++ library in fb using wrappers is possible. In this scenario wrapper is a thin layer that implements c++ library in a C procedural way.

Forxample wx-c is a wrapper that warps wxWidgets into C like api. or MFC that wraps winapi into more OOP style.
url]http://fbide.sourceforge.net/[/url]
Reply
#4
like, in c++ you can have an object with a bunch of methods, lets say your object is called myTimer and it has methos set, print, restore. then in c++ you could do like

Code:
myTimer::set()
myTimer::print()


but in procedural you need only function calls, so a wrapper would be like this (in fb pseudo code)

Code:
sub myTimer_Set()

  myTimer::set()

end sub


of course, it wouldnt be sub...end sub in c++, i just did that so it'd be easier to understand.



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)