calling c++ function from script

hi,

I just started to work on unix,

I was wondering if it is possible to call a c++ function from a script.
now, i don't mean starting a program, i mean dynamicaly calling a funtion (like working with a dll)

thanks

Not in general. A few shells like ksh have some features that allow them to extended in this manner. And ksh will dynamically load a shared library if needed. But you can't use just any c++ function. It must be specially written to know how it will be called, what it must return, and what global variables it can use.

Perderabo, Could you elaborate on this? and possibly point me in the direction of a good book with the details? This sounds interesting..

Information is limited to say the least. I don't know of any book that covers it. And that doesn't surprise me. The details could change with the next release of ksh. There is a Faq on the Kornshell which says:

(I'm sure there's a typo in that quote, "mail program" should be "main program".) This is about all that I feel I quote here. In this article, there is an example. But the documentation with the source code had some differences. You really need to download the source code and read the docs that come with it. The file to look at is "builtins.mm" and you can read it with:
nroff -mm < builtins.mm | col -b | more