Author: Stan Eisenstat
Subject: Re: [Cs223] inconsistent deque object
Date: Monday, 23 Mar 2020, 07:12:07
> Message Posted By: Unknown > > how do we check for an inconsistent deque object? As I posted yesterday: Date: 22 Mar 2020 21:14:05 -0400 (Sun) Subject: Re: [Cs223] Checking for invalid > Message Posted By: Unknown > > In Deque.c, the functions take the arguments (Deque *d, char *s, char > **s). How can we check if these arguments are "invalid", or if the Deque > objects are "inconsistent"? Is there a typeof() function in C? That depends on what struct you are using internally. For example, if it has a field whose value should be a "magic cookie" but is not, then you know that the argument is invalid. --Stan-PREV INDEX NEXT