P
P
PopNik2016-06-05 18:23:37
Qt
PopNik, 2016-06-05 18:23:37

How to write custom class to qFile?

Using the usual C++ tools, a custom class can be written to a file with:

ofstream ofile("Student.dat", ios::binary);
    
    ofile.write(reinterpret_cast<char*>(this), sizeof(Student));

Is it possible to do the same with qFile?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2016-06-05
@Taraflex

pervezonblog.blogspot.ru/2013/08/how-to-serialize-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question