In an exercise i've got to take 2 argument's and concatenate them, Outputting
them in a string. But there is next to no explaination as to how passing and reading the argument's from a command line is accomplished.
Can someone explain where i'm going wrong?
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include <string>
int main(int argc, char *argv[])
{
std::string third;
char first = *argv[1];
char second = *argv[2];
third[0] = first;
third[1] = second;
std::cout << third;
}