Hello, I am begginer in C++ and I have this problem:
when you declare
it will display 4th letter of that char, like I enter 'tester' it displays 'e'.
Now I want to do same with int, but dont know how.
I'd like to enter number like
and if we enter number 50123 it will display number 2 (4th member)
test[0]=5
test[1]=0
test[2]=1
test[3]=2
test[4]=3
I need to do math functions with it then so it wont work with char i think.
can anyone help me how to do it ? Thanks in advance.
when you declare
Code:
char test[50];
cout<<char[3];
Now I want to do same with int, but dont know how.
I'd like to enter number like
Code:
int test[50];
cout << test[3]
test[0]=5
test[1]=0
test[2]=1
test[3]=2
test[4]=3
I need to do math functions with it then so it wont work with char i think.
can anyone help me how to do it ? Thanks in advance.