I did small changes in your code.Now the program is working fine.You execute it and revert me if any problem occurs.
#define MAXSIZE 100
void dec2bin(int n)
cout<<"Enter a number to convert it into binary :";
cout<<"The Binary Equivalent is :";