PREV INDEX NEXT

Author: Unknown
Subject: Checking if Deque does not exist
Date: Sunday, 05 Apr 2020, 01:39:29

I have read two previous newsgroup posts about this but I am still unsure of how to handle the case where a Deque has not been created but we are trying to perform operations on it.

I tried checking if *d == NULL, but this did not work (still got a segmentation fault). I also tried checking if the head and tail members of the deque struct == NULL but this did not work either. 

I put a print statement at the top of isEmptyD() to see if it was even entering the function before producing the segmentation fault, and it was. However, I'm really not sure what kind of if statement to put in there to check if *d (the argument) is a valid deque or not. Any guidance would be great. Thank you.
PREV INDEX NEXT