帮小弟我读读这个程序,再解释一下

帮我读读这个程序,再解释一下。
int   main()
{
ofstream   out( "data.txt ");
if(!out)
{
throw   "Can 't   open! ";
}
out < < "hello   world! " < <endl;  
out.close();
return   0;
}

------解决方案--------------------
//本人也是菜鸟~~不知道是不是这样的
int main()
{
ofstream out( "data.txt ");//打开你C++在的那个文档里建立一个txt文件
if(!out)//要是打不开就输出Can 't open!
{
throw "Can 't open! ";
}
out < < "hello world! " < <endl; //向txt文件里输入hello world!
out.close();//关闭文件
return 0;
}