Quantcast
Channel: Segmentation Fault, pointer issue? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by Jabberwocky for Segmentation Fault, pointer issue?

$
0
0

This will cause a segfault because you are dereferencing a pointer that has not been initialized.

 int *x;    // declares pointer X *x = 3;    // seg fault here because x contains garbage and points certainly to             // invalid memory

Viewing all articles
Browse latest Browse all 3

Trending Articles