读入txt问题
每次close之后,想继续读入而不擦除原来的内容,可以这样写:
ofstream area_file ("area.txt",ios::app|ios::out|ios::in);
而每次均要擦除,这样写:
ofstream area_file ("area.txt",ios::trunc|ios::out|ios::in);
ofstream area_file ("area.txt",ios::ate|ios::out|ios::in);
经过测试,效果是这样的!
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号