I have char that replace by number

char a[10];
cin >> a;

I set a at 4597 and then I want to convert it to four integer

char 4597
integer 4
integer 5
integer 9
integer 7

how can I do it ??? :'(

Member Avatar for iamthwee

Don't use atoi. use stringstream

how to use it?? - -"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.