Just a note for the future. #include "stdafx" . Some people will tell you that this is not a standard C++ header file and should not be there. It is best to delete this line when posting your code. Personally it makes no difference to me.
When I first compiled the program I received errors because of int _tmain(int argc, _TCHAR* argv[]). This may work for the way you have setup the program/project, but not for everyone. I had to change this to int main(int argc, char* argv[]).
When I ran the program the "build" function does not work well. Using a "char" for input, lines 28 and 29 works for detecting the period, but does not store your numbers properly. Also I had to enter about 15 periods to end the input. The "build" function tends to be a recursive loop with lines 35 and 36 thus the need for more than one period to end the input.
I had to put a break point on line 56 just to see the output before the window closed. The numbers I saw were not the numbers I entered, so it was hard to tell if they were in the right order.
The program needs some work, but I am not sure which way to go yet.
Why? You don’t put any condition to determine where every ‘data’ should go, so they are saved in insertion order.
Have a look at what happens inside your code: