Q:

Not getting the different random values even when calling srand()

I've just begun learning C++ and I tried making a small program that randomly selects which games and which teams to bet on for sports gambling.  I have a function that compares two random numbers, the bigger value is the chosen outcome of the game.  
The program compiles and runs, but for some reason it always ends up choosing one outcome, the HOME outcome.  Can someone look over my code and let me know what I've done wrong? I've looked at it for some time now and can't see the problem.  I think it has something to do with doubles to int conversion or something.
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <ctime>

using namespace std;
inline void keep_window_open() { char ch; cin>>ch; }

int a;
int b;
int z;
int games_in_total (int, int);
double vector_home(int, int);
double vector_away(int, int);
string selection(double, double);

//takes user input with regard to how many games are playing and how many games you'd like to bet on

int main()
{ 

    cout << "How many games are there this week? " << endl;
    cin >> a;
    cout << "How many games do you want to bet on this week? " << endl;
    cin >> b;

    cout << " " << endl;

    //calls two functions in order to randomly pick which games to bet on and which team to choose within those games.

    z = 0;
    while (z < b){

    cout << "Pick game No." << games_in_total(a,b) << '\t' << "and choose" << selection((vector_home(a,b)), (vector_away(a,b))) << endl; 
    cout << " " << endl;
    ++z;

    }

    keep_window_open(); 
    return 0;

}

//randomly chooses games within the users input range
int games_in_total(int, int) {
    vector <int> games(0);
    srand (time(NULL));

    int i = 0;
    while(i<b){
    games.push_back(rand()% a+1);
    ++i;
        }

    return games[z];

}

//randomly assigns double values to the home team vector. Also adds 1.75 to the random number to give slight advantage to home teams.
double vector_home(int, int) {

    vector<double>home(0);
    srand (time(NULL));

    int i = 0;
    while(i<b){

    home.push_back((rand()% a+1) + 1.75);
    ++i;
    }

    return home[z];    
}

//randomly assigns double values to the away team vector
double vector_away(int, int) {
    vector<double>away(0);
    srand (time(NULL));

    int i = 0;
    while(i<b){

    away.push_back((rand()% a+1));
    ++i;
    }

    return away[z];
}

//compares the home team and away team vector values and assigns the larger values to the randomly chosen games to bet on.

string selection(double, double ){
    string pick_home;
    string pick_away;

    pick_home = " HOME.";
    pick_away = " AWAY.";

    if ((vector_home(a, b)) > (vector_away(a, b))){ 
         return pick_home;         
         }
    else 
         return pick_away;                  
}

A:

srand() initializes the random number generator.
time(NULL) returns the number of seconds sinds january 1st 1970.
Since you call srand(time(NULL)) before eache call to rand() and your program will probably execute within less than a second, in 99,99...% you will end up initializing the random number generator with the same seed before each call to rand() and thus the result of rand() will be the same throughout the whole run of your program.
Since then you add 1.75 to the home value, its value will always be greater than the away value.

What you have to do:

remove all existing calls to srand() from your code
call srand() just once in main()

