00001 #include <itpp/itcomm.h> 00002 00003 using namespace itpp; 00004 00005 int main() 00006 { 00007 // Declare the it_file class 00008 it_file ff; 00009 00010 // Open a file with the name "it_file_test.it" 00011 ff.open("it_file_test.it"); 00012 00013 // Create some data to put into the file 00014 vec a = linspace(1, 20, 20); 00015 00016 // Put the variable a into the file. The Name("a") tells the file class 00017 // that the next variable shall be named "a". 00018 ff << Name("a") << a; 00019 00020 // Force the file to be written to disc. This is useful when performing 00021 // iterations and ensures that the information is not stored in any cache 00022 // memory. In this simple example it is not necessary to flush the file. 00023 ff.flush(); 00024 00025 // Close the file 00026 ff.close(); 00027 00028 // Exit program 00029 return 0; 00030 }
Generated on Tue Sep 7 2010 18:30:39 for RMOL by Doxygen 1.7.1