Advertisement
Guest User

Neel Basu

a guest
Jul 15th, 2008
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #ifdef HAVE_CONFIG_H
  2. #include <config.h>
  3. #endif
  4.  
  5. #include <iostream>
  6. #include <cstdlib>
  7. #include <string>
  8. #include "serialization.h"
  9.  
  10. using std::cout;
  11. using std::endl;
  12. using std::string;
  13.  
  14. int main(int argc, char *argv[]){
  15.     string x="Neel Basu";
  16.     string y;
  17.     try{
  18.         Serialization<string>::store(x, "/home/neel/Desktop/name.srl");//Line 51
  19.     }catch(SerializationException ex){
  20.         cout<<ex.getErrMsg()<<endl;
  21.     }
  22.     try{
  23.         y=Serialization<string>::load("/home/neel/Desktop/name.srl");//Line 52
  24.     }catch(SerializationException ex){
  25.         cout<<ex.getErrMsg()<<endl;
  26.     }
  27.   return EXIT_SUCCESS;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement