On Tue, 2008-03-18 at 01:18 -0600, Warren Young wrote:
> 1. if (!result.at(0)["Unit_id"].is_null()) ...
Worked perfect for me. I don't really understand why I can't get the
others to work, but I just need a solution right now, so I happy with
what I have.
> > I used the [] operator instead of the at() function and received:
> > error: no match for ‘operator[]’ in ‘result[0]’
>
> It may be a side effect of the fact that the previously suggested code
> doesn't compile. If you still can't use this feature after taking one
> of the alternatives above, it would seem you have some compiler
> limitation. I've tested this here on my CentOS 5.1 system (g++ 4.1.2),
> and it *does* work. I've made it part of the examples, so it will get
> further tested on other compilers before the next release.
My compiler is:
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
I am using Eclipse as my IDE, so maybe that is the issue. I don't know.
Thanks for all your help,
Dustin