views:

45

answers:

2

I have a really big data structure with a lot of fields in it.

I want to save its fields to later compare with later values; but I can't print the content to console, because it's too much code to write by hand. (I have roughly 1k fields.)

How should I solve my problem?

+1  A: 

write the stricture to a file and use some good diff tools.

Yin Zhu
How i can write it to file ? I don't have any overloaded output operator for it .
Night Walker
@Night you need to write the output code yourself then. I mean you printout each field of that structure.
Yin Zhu
As wrote i have there about 1k different fields .
Night Walker
+1  A: 

Use serialization: some tutorial here or here.

Gregory Pakosz