Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Calling C++ function from Prolog and return values in parameters

Hello,
I need help!
I want to call from Prolog, a function defined in C ++ and return values back to Prolog parameters.
How I to do it? Write an example if you know!

file.pro
=========

pro_to_cpp_fun(T1, T2, T3, T4, T5 .... ),
write(T1), % T1 = 10
write(T2), % T2 = 27.3
write(T3), % T3 = "hello"
write(T4), % T4 = 'hello'
write(T5), % T5 = list of values
...


file.cpp
==========

pro_to_cpp_fun(T1, T2, T3 .... )
{
!!! How to Record a Values in: T1, T2, T3, T4, T5 ....
T1 = 10 // ?
T2 = 27.3 // ?
T3 = "hello" // ?
T4 = 'hello' // ?
T5 = list of values // ?
...
}
Sign In or Register to comment.