如何在另一个C ++程序中使用C ++程序 [英] how to use a C++ program in another C++ program

查看:84
本文介绍了如何在另一个C ++程序中使用C ++程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个由类组成的c ++程序,我想可以在其中使用已经创建的程序吗?

解决方案

您确实必须更加明确,因为您的问题如此含糊,以至于可能意味着很多不同的事情.你想做些什么?从另一个程序调用一个函数?在自己的代码中使用其他程序的部分代码?在程序窗口中显示其他程序? ...

因此,请准确准确地描述您的问题,并在可能的情况下举一个清晰的示例.该项目,如果您希望运行其他程序,则可以使用CreateProcess

看到此链接....
http://msdn.microsoft.com/en-us/library/ms682425(VS .85).aspx [ ^ ]

但是您需要描述您想做的更好的事情,因为它不是很清楚. :)


i want to create a c++ program consisting of classes and i want that an already created program can be used in it?
How is it possible?

解决方案

You really have to be way more explicit because your question is so vague that it could mean a lot of different things. What are you trying to do exacty ? Calling a function from another program ? Using part of the code of the other program in your own code ? Displaying the other program in a window of your program ? ...

So please describe your problem precisely and if possible with a clear example.


If you wish to use functions and classes from another program you can just include their files in the project, if you wish to run another program from yours you can use CreateProcess

See this link ....
http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx[^]

But you need to describe what you want to do better because it is not very clear. :)


这篇关于如何在另一个C ++程序中使用C ++程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆