@Mikee C++ is not C#. C++ does not have a virtual machine like .Net.
To do what you want to do you would need to provide compiler, linker, header files and all other stuff needed to build your app and its source code! Are you really sure you want to do this?! To me it is still unclear why users of your application need to change the code of your application?

"First is the calculation of the arrays" - what arrays?
"Then you need to change the code calculations" - why?
Can you explain better and maybe show an example?

Example program Wealth-Lab.
Arrays stock quotes.
So long as data read from a file, it is convenient to modify the code calculation, rather than restart the whole application.
C++ have .Net.https://en.wikipedia.org/wiki/.NET_Framework

@Mikee I still don't understand: who will use your app? Do you expect your users to be able to edit C++ code?
"So long as data read from a file, it is convenient to modify the code calculation, rather than restart the whole application" - I don't get it. What and why exactly do you want to modify?

Yes, you can use C++ with .Net. But are you aware that you would need to stop your app, rebuild it and then start again? Neither C++ nor C# are interpreted languages - you need to build C#/C++ applications if you change the source code.

@Mikee Actually you are wrong: "Wealth-Lab has an integrated programming environment based on C# syntax" from here: https://en.wikipedia.org/wiki/Wealth_Lab
So, what they did is: they incorporated their own programming language which is close to C# and the code written with this programming language is INTERPRETED inside Wealth-Lab. The DON'T rebuild their app.
You can do similar things with http://doc.qt.io/qt-5/qtscript-index.html

@Mikee
Well you can install a compiler and call it with QProcess.
But what you are trying will just work extremely poorly and unless
"void A12(double q1) {qDebug()<<q1;}" is compiled into a DLL and and your
main app can load that DLL at runtime and use the function,

Say you install a compiler with your app.
If you then compile the text file. You get an .O file.
And that cannot run.
You could add that to the main program and recompile it so it can use the function.
But that has to be from outside the program and it be a mess for any end users.Also you would have to include all of the source code of your app.

So WHY must it be c++ you insists on using as a scripting language?

It will be very complicated and how will you handle when there is compiling errors
because user typed invalid c++?

Please use the Topic Tools button to mark as Solved and
Upvote the answer(s) that helped you to solve the issuepostimage.org can be used for screenshots.

"void A12(double q1) {qDebug()<<q1;}" - this is already code. What you would need to do is: compile and link it into a binary.

But you should use http://doc.qt.io/qt-5/qtscript-index.html instead.
Your example, Wealth-Lab, is doing it in a similar way: it uses a SCRIPTING language similar to C# (it is NOT the normal C# from Microsoft!). So, Wealth-Lab does NOT compile C# code.