Files Classes Functions Hierarchy
00001 #include <fstream> 00002 using namespace std; 00003 00004 #include <cubepermanent.h> 00005 00006 cubepermanent::cubepermanent(cube & cb_) 00007 : cb(cb_) 00008 { 00009 load(); 00010 } 00011 00012 void cubepermanent::load() 00013 { 00014 ifstream file("cube.txt"); 00015 00016 if (!file) 00017 return; 00018 00019 cb.read(file); 00020 } 00021 00022 void cubepermanent::save() const 00023 { 00024 ofstream file("cube.txt"); 00025 00026 if (!file) 00027 return; 00028 00029 file << cb; 00030 } 00031
1.5.8