Hi I am a novice programmer and was trying to insert a variable into a vector using the rand() function. I have written code (below) which prints out a vector containing '.' of 6x20. Now I am trying to insert a variable such as 'T' into it randomly. The commented out code is what I have tried unsuccessfully so far.
I have now managed to insert the variable into the vector succesfully but for some reason it is not random? I was wondering if there was something obvious I was missing. Thanks in advance.
#include <iostream>
#include <vector>
using namespace std;