Home Forums Programming Beginning C++ Reply To: Beginning C++


@david-ok I tried to figure it out myself but i really cant get it so i just look at the answers :oops:

anyway i got storm of questions for you if you dont mind…

1: You 1st define zodiac using enumeration type i.e the term "zodiac" is made up of rat,cow,tiger…pig. but i dont quite get this line:
[enum zodiac MySymbol]- you just assign another variable to zodiac??dont really get it,can you pls explain??

2:if((int)MySymbol>1864)-can i leave the(int) part out ALL THE TIME?? so i’ll get this line instead:if(MySymbol>1864)

3:MySymbol = (zodiac)((((int)MySymbol – 1864)%12)+1);

what does this line really do? (zodiac)((((int)MySymbol…….+1);

let’s say i enter 1988 into the code(which will store in MySymbol) and take the first year(rat’s year) away from 1988 and divided by 12 then add 1…i’ll get 11 something but how will the computer knows its case 5???

sorry 4 all these questions but anyway thanks cos ur really helping, glad someone’s here to guide me :D