Write a C++ program to read the names and ages of 10 people and print the name and age of the oldest person. Assume that there are no persons of have the same age.

To write a C++ program that reads the names and ages of 10 people and prints the name and age of the oldest person, you can use an array to store the names and ages, and then iterate through the array to find the oldest person.

Here's an example program that accomplishes this task:

```cpp
#include <iostream>
#include <string>
using namespace std;

int main() {
string names[10];
int ages[10];

// Read the names and ages of 10 people
for (int i = 0; i < 10; i++) {
cout << "Enter name: ";
cin >> names[i];
cout << "Enter age: ";
cin >> ages[i];
}

// Find the oldest person
int maxAgeIndex = 0;
for (int i = 1; i < 10; i++) {
if (ages[i] > ages[maxAgeIndex]) {
maxAgeIndex = i;
}
}

// Print the name and age of the oldest person
cout << "Oldest person: " << names[maxAgeIndex] << ", Age: " << ages[maxAgeIndex] << endl;

return 0;
}
```

To run this program, you can follow these steps:

1. Open a text editor and copy the above code into a new file.
2. Save the file with a `.cpp` extension, for example, `oldest_person.cpp`.
3. Open a command prompt or terminal and navigate to the directory where you saved the file.
4. Compile the program using a C++ compiler. For example, if you have the `g++` compiler installed, you can run the command `g++ oldest_person.cpp -o oldest_person`.
5. Run the compiled program by executing the generated executable. For example, if you're on a Unix-like system, you can run the command `./oldest_person`.

The program will prompt you to enter the names and ages of 10 people. After you provide the input, it will display the name and age of the oldest person.