-5

How can I add two strings together as though they were variables? ex:

std::cout<< a << b << std::endl;

How can I do that only with two strings, a and b?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770

1 Answers1

1

You can't store names which consist of a series of characters in integers. Use std::string instead.

Swordfish
  • 12,971
  • 3
  • 21
  • 43