Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: idispatch concepts not understood Pin
bob1697213-Nov-07 16:16
bob1697213-Nov-07 16:16 
QuestionSending data - TCP connection Pin
bigdenny20013-Nov-07 7:00
bigdenny20013-Nov-07 7:00 
AnswerRe: Sending data - TCP connection Pin
Jim Crafton13-Nov-07 7:10
Jim Crafton13-Nov-07 7:10 
GeneralRe: Sending data - TCP connection Pin
led mike13-Nov-07 7:16
led mike13-Nov-07 7:16 
GeneralRe: Sending data - TCP connection Pin
Jim Crafton13-Nov-07 7:22
Jim Crafton13-Nov-07 7:22 
GeneralRe: Sending data - TCP connection Pin
led mike13-Nov-07 8:24
led mike13-Nov-07 8:24 
AnswerRe: Sending data - TCP connection Pin
led mike13-Nov-07 7:11
led mike13-Nov-07 7:11 
GeneralRe: Sending data - TCP connection Pin
bigdenny20013-Nov-07 8:01
bigdenny20013-Nov-07 8:01 
Dear led,

thanks for reply. I found a tutorial, which should have done a serialization, as you suggested.
Below is the code (with my object, instead the one from tutorial):
  // Serialize the object
  std::vector<std::string> word_list;
word_list.push_back(_T("HI"));
ofstream ofs("c:\\fifthgrade.ros", ios::binary);
ofs.write((char *)&word_list, sizeof(word_list));

// Deserialize it
std::vector<std::string> word_list2;
ifstream ifs("c:\\fifthgrade.ros", ios::binary);
ifs.read((char *)&word_list2, sizeof(word_list)); // last line


The problem is that this code (the last line) doesnt work. And I think this is
because I am using not simple Class instances, but a vector object.

Do you have any idea, what could be other reason for it not to work ?

thanks
GeneralRe: Sending data - TCP connection Pin
led mike13-Nov-07 8:20
led mike13-Nov-07 8:20 
GeneralRe: Sending data - TCP connection Pin
bigdenny20013-Nov-07 8:39
bigdenny20013-Nov-07 8:39 
GeneralRe: Sending data - TCP connection Pin
led mike13-Nov-07 9:17
led mike13-Nov-07 9:17 
GeneralRe: Sending data - TCP connection Pin
bigdenny20013-Nov-07 10:36
bigdenny20013-Nov-07 10:36 
GeneralRe: Sending data - TCP connection Pin
Mark Salsbery13-Nov-07 11:59
Mark Salsbery13-Nov-07 11:59 
GeneralRe: Sending data - TCP connection Pin
Bram van Kampen13-Nov-07 13:58
Bram van Kampen13-Nov-07 13:58 
Questionlink error Pin
josip cagalj13-Nov-07 6:12
josip cagalj13-Nov-07 6:12 
AnswerRe: link error Pin
toxcct13-Nov-07 6:15
toxcct13-Nov-07 6:15 
GeneralRe: link error Pin
josip cagalj13-Nov-07 6:24
josip cagalj13-Nov-07 6:24 
GeneralRe: link error Pin
toxcct13-Nov-07 6:28
toxcct13-Nov-07 6:28 
GeneralRe: link error Pin
josip cagalj14-Nov-07 3:40
josip cagalj14-Nov-07 3:40 
GeneralRe: link error Pin
josip cagalj14-Nov-07 22:10
josip cagalj14-Nov-07 22:10 
Generalnamespace limitations in VC6 Pin
hairy_hats13-Nov-07 5:14
hairy_hats13-Nov-07 5:14 
GeneralRe: namespace limitations in VC6 Pin
toxcct13-Nov-07 5:23
toxcct13-Nov-07 5:23 
GeneralRe: namespace limitations in VC6 Pin
hairy_hats13-Nov-07 5:35
hairy_hats13-Nov-07 5:35 
GeneralRe: namespace limitations in VC6 Pin
toxcct13-Nov-07 5:38
toxcct13-Nov-07 5:38 
GeneralRe: namespace limitations in VC6 Pin
hairy_hats13-Nov-07 5:43
hairy_hats13-Nov-07 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.