Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
head file
#1
Because it said:

"The only local includes that queue.c should have are queue.h and the header file of the underlying data structure on which the array is based." 

Does that I only can include queue.h in queue.c?  Can I include cda.h also?  
Because it says the only local include.

So for:

#include "integer.h"
#include "cda.h"
#include "queue.h"

Should be in the test-queue.c

And queue.c should only have
#include "queue.h"

Is that right?
Reply
#2
(09-09-2017, 10:35 AM)ACCD Wrote: Because it said:

"The only local includes that queue.c should have are queue.h and the header file of the underlying data structure on which the array is based." 

Does that I only can include queue.h in queue.c?  Can I include cda.h also?  
Because it says the only local include.

So for:

#include "integer.h"
#include "cda.h"
#include "queue.h"

Should be in the test-queue.c

And queue.c should only have
#include "queue.h"

Is that right?

I think what he means by underlying data structure is the dynamic array you use in the queue, so cda.h should be in the queue.c.
Reply
#3
^ that is correct. queue.c would also include cda.h
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)