char[] to int? oh yes. yes. indeed. absolutely.

i has char array.

char array has date indexed. Date is variable, depending on user input.

so Day[] may has 11 (11th day of month); Month[] may has 02 (February); Year[] may has 1984, etc...

I would like to now take these char arrays and transfer the contents to an integer. i.e. Day[] = {int}day; Month[] = {int}month;, etc.

the prob? is I can use

 
 day = Day[0] - '0';


so if Day[0] is 1, and Day[1] is 1, equaling 11 (eleven), how do i put eleven into a single int?

I don't think its possible. I think I need to rewrite this without using character arrays. Just trying to salvage some work here.
http://en.cppreference.com/w/cpp/string/basic_string/stol
¿why don't simply read the integer as an integer?
How DARE you answer my question. reported.
Topic archived. No new replies allowed.