2 | test.c:(.text+0x2cd): undefined reference to `pow' |
4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120 124 128 | #include <math.h> inttop; { structStack_Structure*stack_object=(structStack_Structure*)malloc(sizeof(structStack_Structure)); stack_object->array=(int*)malloc(stack_object->max*sizeof(int)); intisEmpty(structStack_Structure*stack_object) { voiddisplay_shift(charfromTower,chartoTower,intdisk) printf('Move Disk %d from '%c' to '%c'n',disk,fromTower,toTower); voidadd_element(structStack_Structure *stack_object,intitem) return; intremove_element(structStack_Structure*stack_object) returnINT_MIN; voidshift_Disks(structStack_Structure *source_tower,structStack_Structure *destination_tower,charsource,chardestination) if(tower1INT_MIN) } display_shift(source,destination,tower1); add_element(source_tower,tower1); else display_shift(source,destination,tower1); voidtower_of_hanoi(intlimit,structStack_Structure *source_tower,structStack_Structure *temporary_tower,structStack_Structure *destination_tower) if(limit%20) temporary=x; { { shift_Disks(source_tower,destination_tower,source,destination); shift_Disks(source_tower,temporary_tower,source,temporary); shift_Disks(temporary_tower,destination_tower,temporary,destination); { structStack_Structure *source_tower,*destination_tower,*temporary_tower; source_tower=createStack(limit); tower_of_hanoi(limit,source_tower,temporary_tower,destination_tower); |