There are so many errors here, I’ll just list everything I see:
Your condition for the loop should be i <10.
Why are you using a template, but not a template parameter T?
You call the front () method on CStr, but CStr is a char, not a string, so I don’t even know how this compiles.
Assuming CStr was a string, you don't want to take the address of the front () iterator with &, instead you want to say something like:
fn.write(St.c_str(), St.size());
And you do not want a loop for iterations of St.Size (). Just do it.