QueuePtr | Intrusive Ptr a buffer pool | Reflection library
kandi X-RAY | QueuePtr Summary
kandi X-RAY | QueuePtr Summary
Intrusive Ptr + a buffer pool. Started with the code from: and morphed it into a RAII style grabage collecting buffer pool.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of QueuePtr
QueuePtr Key Features
QueuePtr Examples and Code Snippets
Community Discussions
Trending Discussions on QueuePtr
QUESTION
I'm creating a simple queue with simple operations. I use an ADT item to contain the informations, in this case only an int value. Then I use this item in the nodes. These are the files:
item.h
...ANSWER
Answered 2018-Apr-24 at 08:31You're doing an often sensible thing here: The struct
is only defined in your implementation of the queue. This makes sure no other module can ever depend on the inner workings of your struct
, so you can change it without touching any external code.
But in your main()
, you try to do what you explicitly forbid: accessing the content of your struct
. It's impossible because the compiler doesn't know the content when compiling your main file.
You have two options:
Move the definition of the
struct
to your header file, therefore making it public.(IMHO preferred): Provide an accessor method like
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install QueuePtr
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page