G
G
Governor2018-02-19 19:58:21
C++ / C#
Governor, 2018-02-19 19:58:21

How in one language to call a function written in another?

I want to write a function that would process the text according to certain rules and return it in a formatted form.
That is, you put text in a text box, you press a button, you get another text there.
I decided to write it in C++, it's easier for me. But the program interface must be in C#.
1) But how do I create a function in C++ and use it in C#?
2) For one thing, I wanted to know if it is also possible to do it with, for example, PHP, in case the program has a web interface?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Yudakov, 2018-02-19
@Mr-Governor

www.c-sharpcorner.com/uploadfile/tanmayit08/unmana...
Here is a nice simple example. And the first time I did not specify the link.

K
Konstantin Tsvetkov, 2018-02-19
@tsklab

But how do I compile a C++ function and use it in C#?
Enlighten yourself about "compile" and "link". Then your question will be: how to line obj-files written in different languages? Google will give hundreds of answers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question