pulling char's from an array

i need some help as to how to do this. at the end of my code i have the user enter 5 words and then i added the array end .
now i need to pull the 1st and 3rd letters of each word(2 letters per line) using the substring function. any help pointing me in the right direction would be greatly appreciated. i am not to familiar with the substring function so ....?

#include <iostream>
#include <string>
#include <fstream>

using namespace std;

const int arraySize = 6;

int main()

{
int array[5];
int counter;
int i = 0;
string userIn;
string strArray[arraySize];

ifstream inData;
ofstream outData;

inData.open("numIn.txt");
outData.open("numOut.txt");





cout << "Please enter five numbers: " << endl;


for (counter = 0; counter < 5; counter++)
{
cin >> array[counter];

}

cout << endl;


cout << "The numbers you entered are: ";

for(counter = 0; counter < 5; counter = counter++)
cout << array[counter] << " ";

cout << endl;



cout << "And the numbers in reverse order are: ";

for (counter = 4; counter >= 0; counter--)
cout << array[counter] << " ";

cout << endl;

cout << "Please enter five words : " << endl;
for (counter = 0; counter < 5; counter++)
{
cin >> strArray[counter];

}

cout << endl;
strArray[5]="end_of_array";




system("pause");

return 0;
}
You can familiarize yourself with the substr function here.
http://cplusplus.com/reference/string/string/substr/

You can read about formatting your post into something that is intelligible here.
http://cplusplus.com/articles/firedraco1/
Topic archived. No new replies allowed.