Thankyou all for your input but I have solved my problem using this format
and example I found in a book hope this helps someone else out::
Code:
#include <iostream>
#include <string>
usingnamespacestd;
int main(int argc, const char * argv[]) {
// insert code here...
string greatstring ("Hello std::string ! ");
cout << greatstring << endl;
cout << " Enter a line of text " << endl;
string firstLine;
getline (cin, firstLine);
cout << " Enter another " << endl;
string secoundLine;
getline (cin, secoundLine);
cout << " Result of concatenation: " << endl;
string concatString = firstLine + " " +secoundLine;
cout << concatString << endl;
cout << " Copy of concatenated string: " << endl;
string aCopy;
aCopy = concatString;
cout << aCopy << endl;
cout << " Length of concat string: " << concatString. length() << endl;
return0;
}