Chuck Norris > Jet li /Discuss

C

ciccio

Victor said:
No, *you* go. And don't come back without a C++ topic.

V

Maybe this is the result.

#include <iostream>
#include "fighter.h"
#include "dojo.h"

int main(void) {
fighter ChuckNoris;
fighter JetLi;

ChuckNoris.LoadMartialArt("Karate");
ChuckNoris.LoadMartialArt("Tang Soo Do");

JetLi.LoadMartialArt("Wushu");

ChuckNoris.setAge(67);
JetLi.setAge(44);

ChuckNoris.setWeapon(NULL);
JetLi.setWeapon(NULL);

dojo ring;

ring.loadFighters(ChuckNoris,JetLi);

ring.setNumberOfRounds((unsigned long int) (-1));
ring.setRoundTime(3600,"s");

ring.StartFight();

std::cout << ring.result << std::endl;

return 0;
}
 
M

Michael DOUBEZ

Dreamlax a écrit :
That should be static_cast <unsigned long it> (-1) shouldn't it?

No, that should be std::numeric_limits<unsigned long>::max().

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top