Thanks, it does explain how pointers work though what I'm asking is if the vendor for sqlite provides specifications for an interface and says it needs and argument in it's API function as a *Variable, but the function won't work unless you input a normal, non pointer variable then how is the user of the software supposed to know without going through the source code.
Is there a way of identifying what kind of variable is required for each argument, because the API documentation has kept this a secret it seems.
I understand what by reference, by value means and how pointers work, but I'm confused as to how to identify what is required by looking at the API documentation which clearly doesn't tell you the requirements but gives you some API reference only relevant to the internal workings of the program and not useful to the user.
Hmm,, Agreed. But this is Sqlite we're talking about.
It's used pretty extensively.
I suppose I'll never know for sure how this is decided. I think, by setting it up as per the API documentation then responding to each error as it occurs is the only way. I can't see the pro's doing that but until I understand how one deciphers the API code then I'm going to have to do it this way.
If you'd read the "Getting Started" section and worked with the core functions before skipping straight to the convenience wrappers, you'd probably have a better grasp of how the API is intended to work.
Output variables will require you to feed the address of a variable you declared to a function. Input variables won't. What's input and output is fairly obvious for most functions after reading the documentation, and from browsing, the core functions have outputs clearly marked in the documentation. I really think the issue here is your understanding of pointers, not being familiar with C API's and just jumping into the middle of things.
No. I understand pointers and I have read the Getting Started Section. C API's in general I'm not so familiar with.
There's allot of references to sqlite in terms of examples and usage of API which are blatantly wrong. Once you find one error, I'm afraid it's difficult to spend copious amounts of time on the rest until your sure you're on the right track.
If you want see what I mean try running example from Listing 6-1 in the Appress book 'The definitive guide to Sqlite' 2nd edition. It obviously been slapped together to get the book out on the market ahead of its competitors.
It's not the first time I've seen comments like this about the book.
But anyway.. regardless of my flaws as a programmer I've simply tried to understand how to interpret the API, not take lessons on the basics again as I'm pretty sure understand that part enough. I've asked a question, thats all..
After all, that's what a forum facilitates.