我是一个新的编程,但我已经做了一个很好的库用于计算数学问题,如二次方程和许多其他。 现在我遇到了一个朋友,他在VB中编程了一些,我们正在考虑是否可以将我的函数从C ++导入他的代码,所以他们可以在需要时调用它们,所以我们可以做一个计算器? 我们如何做?
I'm kinda new to programming, but I have made quite a good library for calculating Math problems like Quadratic Equations and many other. Now I met a friend, and hes programming a little in VB, and we were thinking if it is possible to import my functions from C++ to his code, so he can call them, when they are needed, so we can make a calculator? How can we do that?
- Janman
编辑:我的朋友正在使用VB 编辑:我的库以自由的函数组织。
My friend is using VB My library is organized in free functions.
推荐答案要使用VB中的C ++代码,您有以下可能性:
to use C++ code from VB you have the following possibilities:
-
并从VB调用它们
Create DLL where you export functions; and invoke them from VB like this
MFC或任何其他库,并在VB项目中引用dll,这个解决方案是最好的你可以使用C ++ Com组件作为VB代码中的类。
Create Com component with ATL or MFC or any other library , and reference the dll in VB project, and this solution is the best you can use C++ Com components as classes in your VB code.
更多推荐
我可以在Visual Basic中使用C ++函数吗?
发布评论