[Paraview] VTK XML Binary Output

Olesen, Mark Mark.Olesen at emcontechnologies.com
Wed Apr 1 09:09:09 EDT 2009


> I just tried that and it is now giving me a segmentation fault... I am
> using the following line: 
> file.write(reinterpret_cast<const char*>(size), 4);

The segfault isn't surprising. If you obtain the address of the variable
first, I suspect you'll be much happier:

  int size;
  file.write(reinterpret_cast<const char*>(&size), sizeof(size));


/mark
This e-mail message and any attachments may contain 
legally privileged, confidential or proprietary Information, 
or information otherwise protected by law of EMCON 
Technologies, its affiliates, or third parties. This notice 
serves as marking of its "Confidential" status as defined 
in any confidentiality agreements concerning the sender 
and recipient. If you are not the intended recipient(s), 
or the employee or agent responsible for delivery of this 
message to the intended recipient(s), you are hereby 
notified that any dissemination, distribution or copying 
of this e-mail message is strictly prohibited. 
If you have received this message in error, please 
immediately notify the sender and delete this e-mail 
message from your computer.



More information about the ParaView mailing list