*help me with this program please!*

hey guys, there is this program I tend to make but since I am a beginner I cant make it right.
it's the countries game, in with user should enter at most 20 countries, then the program should randomize them and give them to user to guess them.
there are some conditions for it.
1. by pressing 0 in the middle of the game, user should be shown the menu
2. by pressing 00 it should show the number of lives and score
3. uppercase and lowercase letters shouldn't be different
4. the menu should be like this:
1)start
2)enter the name list
3)check the name list
4)delete the name list


and I have trouble with adding sound and stuff.
I would appreciate your help in this project. thanks a lot.
You need to post your actual code, and ask specific questions about it.

I suggest use to use c string library to deal with words without matter if they are upper case or lower case. And use standard input and output to handle interface. You can use random numbers found in cstdio library. Rewrite question on internet taking into account this, and let us know what you have done.
#include<iostream>
#include<string>
#include<cmath>
#include<time.h>
#include<stdlib.h>
using namespace std;
int main()
{
int n;
cout<<"enter the number of countries:\n";
cin>>n;
while(n<3||n>20)
{
cout<<"please get a number between 2 and 21.\n";
cin>>n;
}
string country;
string count[20];
for (int i=0 ; i<n; i++){
cout<<"please enter the name of countries:\n";
cin>>country;
count[i]=country;
}
int numberOflives;
numberOflives= floor(n/3);

int points=0;

srand(time(0));
int x=rand()%n;
int s=count[x].size();
string words[20];
for(int j=0; j<s; j++)
{
cout<<"-";
words[j]="-";

}
string a;
int e=0;
a=count[x];
while(e<s){
char guess;
cout<<"enter your guess";
cin>>guess;
for(int j=0; j<s; j++)
{
if(guess==a[j])
{
words[j]=guess;
}


}
for(int j=0;j<s;j++)
cout<<words[j];

e++;
}

return 0;
}



i wrote a part of it, when i run the program it just shows the "-" and it doesn't show the words we guessed, and i dont know how to fix it.
PLEASE learn to use code tags, they make reading and commenting on code MUCH easier.

http://www.cplusplus.com/articles/jEywvCM9/

HINT: you can edit your post and add code tags.
Topic archived. No new replies allowed.