string - How to get element type in C++? -
i beginner @ programming in c++, ask you, algorithm/ way see kind of element following in char / string.
for example, if have
char b[]="ab 3";
and index, let's "i"
i=2;
this means on i=3 there '3'. question: there exist algorithm, tells me, if on index 2, type of element on index 3? in our case 'int'.
thank much!
the type element in char array char. can, however, check if char digit isdigit(ch).
Comments
Post a Comment