If you create a struct without initializing, members contain garbage. Just like regular variables, they have whatever random bits were in memory. Don't assume they're zero. Example: Point p; creates a Point, but p.x and p.y hold junk.
If you print before assigning, you get random numbers. This is a common bug source. Some compilers zero memory in debug mode. Then release mode breaks everything. Don't rely on defaults.
Set values explicitly or use brace init: Point p{}; zeros everything.