multiple-indirection

What is double star?

So, I saw this: error:(NSError **)error in the apple doc's. Why two stars? What is the significance? ...

C# P/Invoke: How to achieve double indirection for a field of a structured parameter

I am calling into a native dll from C#. For the specific function in question, one of the parameters I need is a structure which contains a doubly-indirect field (pointer to a pointer). For example, take the following C prototype and structs: int someFunc(SomeStruct* result); struct SomeStruct { DWORD foo; AnotherStruct** p...

TOUGH: Dealing with deeply nested pointers in C++

I define this structure: struct s_molecule { std::string res_name; std::vector<t_particle> my_particles; std::vector<t_bond> my_bonds; std::vector<t_angle> my_angles; std::vector<t_dihedral> my_dihedrals; s_molecule& operator=(const s_molecule &to_assign) { res_name = to_assign.res_name; my_particles = to_assign.m...

Weird Pointer issue in C++

I'm running into a VERY frustrating pointer issue. I previously posted here: http://stackoverflow.com/questions/3114997/tough-dealing-with-deeply-nested-pointers-in-c But that post got overly long and is stale, so I chose to repost with more details. Here is my header file that defines my types: #include <string> #include <vector> #i...