Figured one of you dot net developers might be able to assist me with a c question. I can not for the life of me figure out how to print the value. I keep on getting a Segmentation fault error when running this code. Though it compiles perfectly fine.
Thanks
Code C:#include <stdio.h> void changeMe(int *pNum); main() { int *pNum; changeMe(pNum); printf("%d/n",*pNum); } void changeMe(int *pNum) { *pNum = 7; }



Reply With Quote
Bookmarks