i want to write a programm,which takes an input from keayboard and if it 's char it is stored into an array ,if it 's int it is stored into another array.The problem is that when i am using cin>>x; , i dont know how to declare x.I have to declare as char or int ??
Declare your x as char array. After getting input, try to parse it with atoi() or similar functions. On succes, store result in second array, on failure store char in first array.