I don't understand my compiler

Why do I keep getting compiler errors when I try compiling this...
1
2
3
4
5
6
7
8
9
10
11
12
int main (){
//making memory allocations for input and output arrays
    char input[10];
    char output[10];
//acquiring input array
    std::cout << "Input your string \n";
    std::cin >> input;
//defining output array, trying to print array
    output=strcpy(input);
    std::cout << output; endl;
    return 0;
}
1
2
3
4
5
6
7
8
9
10
#include<iostream>
int main(){
    char input[10];
    char output[10];
    std::cout << "Input your string \n";
    std::cin >> input;
    strcpy(output,input);
    std::cout << output<<std::endl;
    return 0;
}
Topic archived. No new replies allowed.