I created structure Route.h
#include "stdafx.h"
using namespace std;
struct Route {
    string startPoint;
    string endPoint;
    int number;
};
and I need to pass this structure to function. I used reference:
void CreateRoute(Route &route)
{
  int start = rand() % 10;
  int end = rand() % 10;
  if (start == end)
  {
    while(true)
    {
      end = rand()%10;
      if(end != start) break;
    }
  }
  route.startPoint = SetPoint(start);
  route.endPoint = SetPoint(end);
  route.number = SetNumber();
}
but it seems the using of pointers is the better way to do it, but I don't know how to use pointers for it?
 
     
     
     
    