Help making random string

Hi I'm trying to make a random string of numbers, and then replace those numbers with the letters R, G, Y, and B to make a Simon Says program. I'm having a lot of trouble making a string of random numbers between 0 and 3 so that I can assign those numbers to the letters. I'm very new to C++ and don't understand because I don't really need to for my major. Right now, what I want the program to do is randomly pick 15 numbers, replace those numbers with R,G,Y, and B, and then just print an element of the string to see that it works. Whenever I ask to see an element, it doesn't work though. Can you guys help me out at all?
Here's my code:

#include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(){

//Declare Variables
string s;
int i;
int j;
string color;


//Welcome message
cout<<"Welcome to Simon, press Enter to play...";
getline(cin,s);
cout<<'\014';

//Play the game
//Generate random numbers 0-3 and replace them with R,B,G, and Y
srand (time (NULL));
for(i=0;i<15;i++){
color[i] = rand () % 4;
switch(color[i]){
case 0:
"R"; //Replace 0's with R's
break;
case 1:
"B"; //Replace 1's with B's
break;
case 2:
"Y"; //Replace 2's with Y's
break;
case 3:
"G"; //Replace 3's with G's
break;
}
}
//Print an element to see if it worked
cout<<color[1];



Topic archived. No new replies allowed.