my code has 3 classes n_hexa,n_octa,n_bin. The code is here
switch(choice) { case 1: cin>>n; n_hexa nx(n); break; case 2: cin>>n; n_octa
Try declaring the variables above the switch command:
n_hexa nx; n_octa no; n_bin nb; switch(choice) { case 1: cin>>n; nx(n); break; ...