24 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for can-mohan

In below code i am writing file contents in backup serialize file through boost serialization library, but what i observed that every time i need to store all the data in file then only i would be able to read the entire data. so in case if i perform single …

Member Avatar for can-mohan
0
327
Member Avatar for Pyler
Member Avatar for Pyler

I can serialize an object if it's class definition has attributes. So if I have an object whose class does not have attributes, do I serialize the attributes importedi in it's class definition? For example; suppose I have the following class, #ifndef BREAD_H #define BREAD_H #include "EGGS.h"; #include "FLOUR.h"; class …

Member Avatar for mike_2000_17
0
274
Member Avatar for Elixir42

Hi Kind-DaniWebbers, How do you initialise a boost::archive:binary_oarchive in a different place to where you declare it? So: class CBase { std::ofstream m_ofs; boost::archive:binary_oarchive m_binOA(); // <== default constructor virtual void Open(std::string& s) = delete; }; class CDerived : CBase { void Open(std::string& s) override { CBase::m_ofs("filename.bin", std::ios::binary); CBase::m_binOA(CBase::m_ofs, /*flags*/); …

Member Avatar for Elixir42
0
414
Member Avatar for CoilFyzx

Hello good afternoon. I have successfully serialized data in the past, however it seems as if I don;t fully understand the process. I have a class called ProgramState which stores a variable (called lastCreated) with custom class LinesProject and an ArrayList variable(called recentProjects) of this custom class. The purpose of …

Member Avatar for CoilFyzx
0
372
Member Avatar for WildBamaBoy

I'm trying to send data back and forth between two computers using a Socket (TCP). The data is in the form of serialized Packet objects. At an early point in the application, it must send 25 or so Packets of the same type to the other side. See Case 1 …

Member Avatar for Ketsuekiame
0
525
Member Avatar for CPT

Currently I have something like this: class FileWritter{ ofstream file; public: FileWritter(string filename,A_Class a){//A_Class is class which has defined the >> and the << operators file.open(filename.c_str()); file<<a; } ~FileWritter(){ file.close(); } }; what I want is to have something like this: template <class AbstractClass> class FileWritter{ ofstream file; public: FileWritter(string …

Member Avatar for mike_2000_17
0
505
Member Avatar for danielgr

Hi, I have a webservice which needs to be serialized. At the moment I can call the webservice as: Call10.Process("field_a","field_b") and the function looks like this: Public Function Call10(ByVal User As String, ByVal Password As String) As String If User = "user" Then MsgBox("Correct User") End If If Password = …

Member Avatar for danielgr
0
182
Member Avatar for coolerking

im trying to make my own Serialization library but I have some problems with the following. I have a package wich I serialize to a t_stream and then I need to serialize the t_stream to a char * again. This is the complete code: typedef struct{ int16_t port; int16_t priority; …

Member Avatar for deceptikon
0
158
Member Avatar for suncica2222

I'm using Netbeans 7, JEE project with application client, stateless ejb with remote interface, and JPA entity clasess made from sql script. Interfaces are in separate library project which is referenced in ejb and client project. **And the problem is the remote method that use custom interface object made from …

0
182
Member Avatar for zeronis

Hi! Using string, ifstream and ofstream object. Compiling - ok, but give a run-time error after printing Name in ReadData() function. My Person class include only one string member "name" and function "Name()" which return string object "this->name". And constructor with string parameter of course... [CODE]#include <iostream> #include <fstream> #include …

Member Avatar for Narue
0
221
Member Avatar for JamieC90

Hi all, I'm trying to write a program that holds student data in arraylists. I've managed to get all the adding, editing, deleting, displaying etc. working and now all I need to do is to make sure it saves on exit and loads on startup By following another tutorial, I …

Member Avatar for JamieC90
0
839
Member Avatar for ninjatalon

So I just started reading about serialization of class and how I can save them into a binary file. But after I define my class as <serializable()> and try to save the object it keeps throwing me this exception. [COLOR="Red"]"An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional information: …

Member Avatar for ninjatalon
0
163
Member Avatar for micmo

Hi guys, I've been searching for hours now and haven't yet found a good source of C# information for what I need to do. The general gist is this: I have 1 Client app (a simple windows form which gathers data) and 1 Server console app (which holds the business …

Member Avatar for micmo
0
650
Member Avatar for Alex_

Hello. I'm trying to serialize a class that implements Serializable and a Runnable. My class has a transient Thread object as a field that is created and started after the restoration of my class(object). This is proven possibile by a tutorial from Oracle, [URL="http://java.sun.com/developer/technicalArticles/Programming/serialization/"]here[/URL]. But i fail to compile my …

Member Avatar for Alex_
0
2K
Member Avatar for Nitin Daphale

Hi all, In my project I am creating .dat(or any extension) file after BinnaryFormat Type Serialization of objects(Datatable) and I deserialize that .dat file to retrieve Data from object(Datatable). Problem is when I open that .dat file , I can simply see sort of Data. [I] My question is how …

Member Avatar for mshauny
0
119
Member Avatar for Rikard

Hallo! I've been having some trouble getting a save/load function to work properly. I'm trying to save object and their properties to a file in binary using fstream. And then being able to load the object from the binary file the next time im running my project. Quick breakdown: I …

Member Avatar for Rikard
0
204
Member Avatar for nv136

Hello everyone, I am not a professional at vb.net so help me out. I have made a small program and a want to add a serial control to it.... here is my code.... Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text …

Member Avatar for nv136
0
494
Member Avatar for bushman_IL

Hello, I am trying to send an object over a socket using C#. I originally used a memorystream and binaryformatter, but to do this I need to include a reference from program1 to program2. I don't want to have a reference, so I just want to be able to transform …

Member Avatar for bushman_IL
0
1K
Member Avatar for leiger

Basically I've got a text editor which revolves around a jTextArea. There are some settings (e.g. whether line wrap is enabled) that I'd like to save to a file when the application closes, and then load up again when it runs next. I've spent a few hours trying to get …

Member Avatar for leiger
0
194
Member Avatar for emilo35

So, a while ago I wrote a SerializableImage class in order to easily bundle several images together into a single file. The class worked fine, both serializing, file I/O and drawing. In another project I'm working on I successfully used a copy of this SerializableImage class, until recently. I had …

Member Avatar for emilo35
0
182
Member Avatar for sdmcnitt

Hope I chose the correct forum. I have a dataset object with one table that comes to me from a common custom component's GetDS method. I need to pass XML to another process (chunked as byte array). I have it all working but the XML is missing some attributes that …

0
115
Member Avatar for zachattack05

Hi! I'm new to the site! I've been searching for help on Google for a while and keep getting results that point to this site, so I figured I should jump on. I'm new to C#. I've been programming in VBA in MS Access for a while now and have …

Member Avatar for drifai
1
854
Member Avatar for Diamonddrake

In my project I had been using a set of arrays to hold some data, realized it was a bad design, so then I decided to create an object that holds all the relevant data, and add them to an arraylist, this work great except all the data was information …

Member Avatar for Diamonddrake
0
190

The End.