//Write a program to copy one string to another string, input the string into the
//first string variable and then copy this string to the second string variable by copying characters one by one.
#include <iostream>
#include <conio.h>
#include <cstdlib>
int main()
{
constint N = 15;
char str1[N], str2[N];
std::cout << "Enter any string (no more than " << N << " char) = ";
std::cin.getline( str1, N );
for ( int i = 0; str2[i] = str1[i]; i++ );
std::cout << str2;
getch();
return 0;
}
[Error] lvalue required as left operand of assignment
[Error] expected ';' before ')' token
and the cursor is positioned on the exact location of the error. The fix should be straightforward if you are familiar with for-loops, but you may need keen eyesight to look closely at the code.