answersLogoWhite

0

#include
#include

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::getline;

int main()
{
string firstLine = "";
cout << endl << "Enter first line: ";
getline(cin, firstLine);

string secondLine = "";
cout << endl << "Enter second line: ";
getline(cin, secondLine);

cout << endl << "Two strings concatenated together: " << firstLine + secondLine << endl;

system("PAUSE");
return 0;
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What does the plus in java mean?

It is used for addition - to add two numbers. Also, to concatenate two Strings (texts) - that is, to make a longer text from two shorter ones.


A program c plus plus on automorphic numbers or not?

how to write a program that counts automorphic number from 1 to 999


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


Write a program in c plus plus to implement macro processor?

Don't write, it is already written, google for 'cpp'.


How do you write program to convert meter to kilometer in c plus plus?

Divide it by 1000.


Do I need to write a program to find a substring in a given string in c plus plus?

No.


Does 2 plus 4 equal 24?

Not with the usual operation associated with the word "plus". However, if "plus" is redefined to mean concatenate, then the answer would be Yes.


How do you write a c plus plus program to sort a vector of strings using MSD radix sort?

The standard library sort algorithm automatically uses MSD radix to sort strings: std::vector&lt;std::string&gt; vs = {"a", "b", "c" "d", "ab"}; std::sort(vs.begin(), vs.end()); After sorting, the order will be: {"a", "ab", "b", "c", "d"}


How do you write an Algorithm for a C plus plus Program?

You don't write an algorithm for a C++ program, unless you are documenting the C++ program after-the-fact. The normal procedure is to write the algorithm first, in a language independent fashion, and then translate that stated algorithm into C++ code, or into whatever language you wish.


Write a program in c plus plus to compute first of non-terminal?

there is no solution of this problem...........that's it..........


How many classes can we write in a single c plus plus program?

Its limited only by available memory.


How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")