alguien sabe como puedo solucionar este error, me dicen que pude ser de compilacion
Publicado por kevin castrillo (1 intervención) el 01/12/2019 20:04:11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "Guy.h"
Guy::Guy()
{
this->_name = "";
this->_cash = 0;
}
Guy::Guy(string name, int cash)
{
this->_name = name;
this->_cash = cash;
}
void Guy::setName(string name)
{
this->_name = name;
}
string Guy::getName()
{
return this->_name;
}
void Guy::setCash(int cash)
{
this->_cash = cash;
}
int Guy::getCash()
{
return this->_cash;
}
// Retorna cantidad de dinero prestada.
int Guy::askForCash(int amount) {
if (amount <= this->_cash && amount > 0) {
this->_cash -= amount;
return amount;
} else {
cout<<"I don't have enough cash to give you "<<amount<<","<<_name<<" says..."<<endl;
return 0;
}
}
// Retorna cantidad de dinero recibida.
int Guy::receiveCash(int amount) {
if (amount > 0) {
this->_cash += amount;
return amount;
} else {
cout<<amount<<" isn't an amount I'll take,"<<this->_name<<" says..."<<endl;
return 0;
}
}
string Guy::toString()
{
stringstream s;
s<<"Guy={"
<<"name="
<<getName()
<<", cash="
<<getCash()
<<"}";
return s.str();
}
________________________________________________
Compilacion interrunpida
Errores (2)
-libmingw32.a(main.o):(.text.strartup+0xa0): undefined reference to ´WinMain@16´
-collect2.exe: error: Id returned 1 exit status
_________________________________________________
el codigo completo esta bien, pero cuando lo trato de compilar en mi compu me tira esos 2 errores, en varios programas me pasa lo mismo, lo copio y lo pego en otro ID (zinjai ) y tambien me tira los mismos errores, se lo mande a un compañero el codigo y a él en dev c++ tambien le aparece el error y lo paso a zinjai y si le compilo bien, yo he desinstalado los dos ID´s varias veces y de igual forma cuando compilo el codigo me aparece los mismos errrores.
Alguien sabe como puedo solucionarlo?
Valora esta pregunta
0