如何在另一台计算机上使用我的项目
How to use my project on another computer
很抱歉,我的英语不够好!!
我在 visual studio 2012 年编写了一个 C++ 控制台应用程序,现在我想 运行 在另一台没有源文件而只有 exe 文件的计算机上使用它
我尝试将 .exe 文件复制到另一台计算机 (windows 7) 并在该计算机上复制 运行 但它没有用!!
我应该如何在另一台计算机上 运行 这个程序?
我可以为我的控制台应用程序创建一个安装文件吗?
谢谢....
这是我的一些代码:
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <vector>
#include "Person.h"
#include <Windows.h>
using namespace std;
int main()
{
ifstream iFile("phonebook.txt", ios::in);
ofstream oFile("phonebook.txt", ios::out);
vector<Person *> phoneBook;
string n, f, t, m; //baraye inke 0 avale shomare ha ham hesab shavad adadhaye voroodi ra ham az jense string tarif mikonim
int i,choose,choose2;
bool flag=true;
while(flag)
{
system("cls");
cout<<"1. Insert Contact\n2. Show Contacts\n3. Exit\n";
cin>>choose;
switch(choose)
{
case 1:
system("cls");
cout << "\t\t\t***Insert New Contact***\n";
cout<<"\n\nName: ";
cin >> n ;
cout<<"\nFamily: ";
cin>> f ;
cout<<"\nHome Number: ";
cin>> t ;
cout<<"\nMobile Number: ";
cin>> m;
phoneBook.push_back(new Person(n, f, t, m));
for (i = 0; i < phoneBook.size(); i++)
{
oFile << phoneBook[i]->getName() << ' ' << phoneBook[i]->getFamily() << ' ' << phoneBook[i]->getTell() << ' ' << phoneBook[i]->getMobile() << endl;
}
break;
//....
目标机器将需要 VC++ 可再发行组件,或者要求可执行文件与 VC++ 依赖库打包在一起,这些依赖库可以在 here 中找到。
很抱歉,我的英语不够好!!
我在 visual studio 2012 年编写了一个 C++ 控制台应用程序,现在我想 运行 在另一台没有源文件而只有 exe 文件的计算机上使用它 我尝试将 .exe 文件复制到另一台计算机 (windows 7) 并在该计算机上复制 运行 但它没有用!! 我应该如何在另一台计算机上 运行 这个程序? 我可以为我的控制台应用程序创建一个安装文件吗?
谢谢....
这是我的一些代码:
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <vector>
#include "Person.h"
#include <Windows.h>
using namespace std;
int main()
{
ifstream iFile("phonebook.txt", ios::in);
ofstream oFile("phonebook.txt", ios::out);
vector<Person *> phoneBook;
string n, f, t, m; //baraye inke 0 avale shomare ha ham hesab shavad adadhaye voroodi ra ham az jense string tarif mikonim
int i,choose,choose2;
bool flag=true;
while(flag)
{
system("cls");
cout<<"1. Insert Contact\n2. Show Contacts\n3. Exit\n";
cin>>choose;
switch(choose)
{
case 1:
system("cls");
cout << "\t\t\t***Insert New Contact***\n";
cout<<"\n\nName: ";
cin >> n ;
cout<<"\nFamily: ";
cin>> f ;
cout<<"\nHome Number: ";
cin>> t ;
cout<<"\nMobile Number: ";
cin>> m;
phoneBook.push_back(new Person(n, f, t, m));
for (i = 0; i < phoneBook.size(); i++)
{
oFile << phoneBook[i]->getName() << ' ' << phoneBook[i]->getFamily() << ' ' << phoneBook[i]->getTell() << ' ' << phoneBook[i]->getMobile() << endl;
}
break;
//....
目标机器将需要 VC++ 可再发行组件,或者要求可执行文件与 VC++ 依赖库打包在一起,这些依赖库可以在 here 中找到。