Hey, I have been struggling with a problem on a project Im working on.
I have 3 ints, day, month, year and I want to put them into a string I use for another function to search through a file.
so lets say
day = 20
month = 11
year = 08
I want the string to contain "201108"
Seems like there should be a simple solution to this, but my head is starting to cook over this.
I know I can put 3 strings together by
string a, b, c, d;
a += b;
a += c;
a+= d;
cout "String b + c + d combined: << a << endl;
To use the method above, I need to convert each interger into a string, but every convertion method I find is usually used with a char array. strcat, strcpy, printf, sprintf.