C2784的错误: st: stream-ostream<_Elem,_Traits> &std:operator <&td:basic_ostream<_Elem,_Traits> &,const :basic_string<_Elem,_Traits,_Alloc> &) :>could not ded. 模版:basic_o&documents;_E,_lem_Tracts&.
《刑法》规定:
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "Pacient.h"
using namespace std;
void ruajKartele(Pacient patient)
{
int mosha;
char gjinia;
string foo=patient.getEmer();
string skedar=foo;
ofstream file;
file.open(skedar, ios::app);
skedar<<foo+"
";
mosha=patient.getMosha();
gjinia=patient.getGjinia();
foo=patient.getDiagnoza();
skedar<<mosha<<"
"<<gjinia<<"
"<<foo<<"
";
foo=patient.getPrognoza();
skedar<<foo+"
";
skedar<<"-----
"; //5
skedar.close();
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
//Pacient structure:
#include <string>
class Pacient
{
protected:
std::string emer;
int mosha;
char gjinia;
std::string diagnoza;
std::string prognoza;
public:
Pacient(void);
~Pacient(void);
void setEmer(std::string);
void setMosha (int);
void setGjinia(char);
void setDiagnoza(std::string);
void setPrognoza(std::string);
std::string getEmer(void);
int getMosha(void);
char getGjinia(void);
std::string getDiagnoza(void);
std::string getPrognoza(void);
};