![]() |
#2
apull2013-06-03 10:39
|

#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
class computer
{};
class parts : virtual public computer
{
private:
char disk[20];
char CPU[20];
public:
parts(char *p = new char[20],char *q = new char[20])
{
strcpy(disk , p);
strcpy(CPU , q);
}
void out()
{
cout << disk << endl;
cout << CPU << endl;
}
};
#include <fstream>
#include <string.h>
using namespace std;
class computer
{};
class parts : virtual public computer
{
private:
char disk[20];
char CPU[20];
public:
parts(char *p = new char[20],char *q = new char[20])
{
strcpy(disk , p);
strcpy(CPU , q);
}
void out()
{
cout << disk << endl;
cout << CPU << endl;
}
};
错误 3 error LNK2019: 无法解析的外部符号 _main,该符号在函数 ___tmainCRTStartup 中被引用
错误 4 error LNK1120: 1 个无法解析的外部命令