#include "stdafx.h"
#include <iostream>
#include <string>
template <typename Any>
void get_object(Any object)
{
std::cout << object << std::endl;
}
template <typename Any, typename other>
void get_object(Any object,other number)
{
for (int i = 0;i < number-1;i++) { std::cout << object << std::endl; }
}
void inc_used(int *used, std::string text)
{
*used++;
get_object(text,*used);
}
int main()
{
int *used = new int;
*used = 1;
std::string *x = new std::string;
std::cout << "What do you want to run?" << std::endl;
getline(std::cin, *x);
if (*x == "text")
{
get_object(*x);
}
else {
inc_used(used, *x);
}
delete x;
delete used;
system("pause");
return 0;
}