为什么参数会无法转换,望有人解答。(标签-算法|关键词-stream)

/*编写算法,将两个串连接起来,例如,串A=“abc”,串B=“defg”,则连接后得到串C=“abcdefg”,不要使用系统函数strcat。*/
#include 
using namespace std;
const int maxsize = 100;

typedef struct {
    char ch1[maxsize + 1], ch2[maxsize + 1];
    int n1 = 0, n2 = 0;
} sqstring;

void input(sqstring *sq1, sqstring *sq2, int n1, int n2) {
    char scan1, scan2;
    cout << "请输入字符串1,以$结束" << endl;
    while (cin >> scan1, scan1 != '$') {
        sq1->ch1[n1] = scan1;
        sq1->n1++;
    }
    sq1->n1++;
    cout << "请输入字符串2,以$结束" << endl;
    while (cin >> scan2, scan2 != '$') {
        sq2->ch2[n2] = scan2;
        sq2->n2++;
    }
    sq2->n2++;
}

int main() {
    sqstring *sq1, *sq2;
    int n1, n2;
    input(&sq1, &sq2, n1, n2);
    int len1;
    char ch3[100];
    for (int i = 0; i < 100; i++) {
        if (sq1->ch1[i] == '\0') {
            len1 = i++;
            break;
        } else if (i < sq1->n1) {
            ch3[i] = sq1->ch1[i];
        }
    }
    for (int j = len1; j < 100; j++) {
        if (sq2->ch2[j] == '\0')
            break;
        else
            ch3[j] = sq2->ch2[j];
    }
    cout << "字符串1连接字符串2后为:" << endl;
    for (int k = 0; k < 100; k++) {
        cout << ch3[k];
    }
}

img