P
paidojoao-groups
Hi,
How do I get the (s)scanf behaviour below using IOStream?
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int m, d, y;
sscanf("05091968", "%02d%02d%04d", &m, &d, &y);
cout << m << "/" << d << "/" << y << endl; // 5/9/1968
return 0;
}
Regards,
Josue Gomes
How do I get the (s)scanf behaviour below using IOStream?
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int m, d, y;
sscanf("05091968", "%02d%02d%04d", &m, &d, &y);
cout << m << "/" << d << "/" << y << endl; // 5/9/1968
return 0;
}
Regards,
Josue Gomes