1. 程式人生 > >有時候需要VS重新生成解決方案

有時候需要VS重新生成解決方案

#include "Employee.h"
#include <iostream>
#include <vector>
#include <iterator>
using namespace std;
int main(){
 CEmployee* c=new CEmployee;
 cout<<c->GetName()<<endl;
 CEmployee c1;
 cout<<c1.GetName()<<endl;
}

#ifndef EMPLOYEE_H
#define EMPLOYEE_H

#include <string>
using namespace std;

class CEmployee
{
public:
 CEmployee(string name="nan"){strName=name;}
 ~CEmployee();
 void Setname(string name);      //設定員工名
 string GetName();    //返回員工名
private:
 string strName;       //員工名
// CEmployee();
};

#endif

修改"nan"需要重新生成解決方案