string does not name a type

My code:

#include <iostream>
#include <string.h>

using namespace std;

class Menu
{
private:
String choices[5];
String title;
public:
int Select();
};

int Menu::Select()
{
int i;
int selection = 0;
for (i = 0; i < 5; i++)
{
cout << (i+1) << ": " << choices[i] << endl;
}
while (selection < 1 || selection > 5)
{
cout << "Enter selection: ";
cin >> selection;
}
return (selection - 1);
}

int main()
{
return 0;
}

When I try to compile this I get the error message "String does not name a type." Also, I get the message "'Choices' was not declared in this scope." I don't understand why I am getting either of these errors.
 
#include <string> 


not

 
#include <string.h> 
I tried changing #include <string.h> to #include <string> but I still get the same error messages.
The string type is "string" not "String"
thanks, that was simple
Topic archived. No new replies allowed.