- #1
ineedhelp420
- 1
- 0
Code:
#include <iostream>
#include <string>
using namespace std;
int main() {
string secretID = "Barry";
string lastName = "Allen";
char spaceChar = ' ';
/* Your solution goes here */
cout << secretID << endl;
return 0;
}
I don't understand this. i need help
i'm suppose to out put "Barry Allen" but what do i push back?
Retype and correct the code provided to combine two strings separated by a space. Hint: What type of parameter does push_back expect?
Code:
secretID.push_back(spaceChar);
secretID.push_back(lastName);
Last edited by a moderator: