ive finaly figured it out! the crash is because of string str;
in the loop
i tried to access the str by using index ! and it showed me that string str is rather different than string str[length] !! so that was the catch!
for (int i=0;i<9;i++)
after that i noticed that the function doesnt return anything ! at least if in returns anything , that thing is empty!! why ? because i tried to copy str elements to a buffer using
and then tried to print the stuffs (buffers) on the console screen! but nothing was printed!
well where is the catch this time ? is there any other ways to copy this (string str) form of string to another string (like string str1[n])?