Click here to Skip to main content
15,922,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have variant variable like
variant_t avarData;
i convert recordset to variant array using
avarData = m_pRS->GetRows(a);
now i want to access element from variant array using avardata(0,0)
but this gives me error as term does not evaluate to a function taking 2 arguments
Posted

1 solution

Round brackets '()' are actually reserved for function calls in C++ (we use '[]' for accessing array items).
Anyway you cannot use the standard way for accessing array items, since GetRows returns a 'SAFEARRAY beast'. You may access the safearray via the variant_t's parray member. See, for instance, the following thread[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900