Everytime I run it crashes at the very start up. Can somebody explain why it does this? Almost everytime I use pointers, the program always crashes. Can somebody explain why it does this?Code:#include <stdio.h> #include <stdlib.h> typedef struct { char* Name; char* Desc; //bool* Comp; }quest; int main(int argc, char *argv[]) { quest *QOne; QOne->Name = "Number One"; printf(QOne->Name); quest *QTwo; QTwo->Name = "Number Two"; printf(QOne->Name,"\n",QTwo->Name); system("PAUSE"); return 0; }
(Note: I have read the tutorials)