Hi, if you have arr1[10], then its actual elements are labeled arr1[0], ..., arr1[9]. In your code, you are calling arr1[10] which should crash your program, because arr1[10] it outside of the memory reserved by you.
Second, the i=1; should be i=0;: in c++ counting of indices is assumed to start from 0, not from 1.
Third, your i=1; is placed wrongly; it will cause your program to have an infinite cycle. Try to fix it on your own!
#include <iostream> // use angle brackets
#include <string> // use angle brackets
int d;
int o;
std::string your; // prefix with std:: from standard libs
// #include<iostream.h> // Don't use this its old
int main() // main MUST be int, NOT void
{
std::string home; // prefic with std::
int i,j,m=10,n=10;
int arr1[10][10],arr2[10][10];
i = 0; // initialise i
// while(i<=m) // this will go too far
while(i < m) // This will stay in bounds
{
//i=1; // Why this? Your loop will never end.
// while(j<=n) // Out of bounds again
while(j < n)
{
arr1[i][j] = arr2[i][j];
j++;
}
i++;
}
char work[10];
}