If I create a map for names and birthdays. When i enter birthdates that end in 0 it changes it the number to an octal. how do i print out the birthday ie 010525
== 4437
so when i call it -> second
it will print 010525
#include <stdio.h>
#include <iterator>
#include <string>
#include <map>
#include <iostream>
using namespace std;
int main(){
map<string, int>birth;
birth["Chicken"] = 010525;
birth["Dragon"] = 010266;
map<string, int>::iterator it;
for(it = birth.begin() ; it != birth.end(); it++){
cout << it -> first + " ";
cout << it ->second << endl;
}
}
Output:
Chicken 4437
Dragon 4278
std::string
? – Evg