My friend wrote a program in CodeWarrior and I'm trying to get it to work in Dev-C++. I keep getting linker errors and I don't know how to fix the problem. Can anyone help me out?
Code:#include <iostream> #include <dice.h> void wait(double); using namespace std; int main(void) { int xAxis,yAxis,repeat=0; class Dice die(79),die2(25),mover(4); xAxis = die.Roll(); yAxis = die2.Roll(); for(int temp=0;temp<=yAxis;temp++) { cout<<endl; } for(int temp=0;temp<=xAxis;temp++) { cout<<" "; } while(repeat==0) { wait (0.05); int numMover=mover.Roll(); if((numMover==1)&&(yAxis!=0)) { yAxis=yAxis-1; system("cls"); for(int temp=0;temp<=yAxis;temp++){cout<<endl;} for(int temp=0;temp<=xAxis;temp++){cout<<" ";} cout<<"*"<<endl; } if((numMover==2)&&(yAxis!=25)) { yAxis=yAxis+1; system("cls"); for(int temp=0;temp<=yAxis;temp++){cout<<endl;} for(int temp=0;temp<=xAxis;temp++){cout<<" ";} cout<<"*"<<endl; } if((numMover==3)&&(xAxis!=0)) { xAxis=xAxis-1; system("cls"); for(int temp=0;temp<=yAxis;temp++){cout<<endl;} for(int temp=0;temp<=xAxis;temp++){cout<<" ";} cout<<"*"<<endl; } if((numMover==4)&&(yAxis!=79)) { xAxis=xAxis+1; system("cls"); for(int temp=0;temp<=yAxis;temp++){cout<<endl;} for(int temp=0;temp<=xAxis;temp++){cout<<" ";} cout<<"*"<<endl; } } return 0; } void wait (double seconds) { clock_t endwait; endwait = clock () + seconds * CLOCKS_PER_SEC ; while (clock() < endwait) {} }



LinkBack URL
About LinkBacks


