Questions tagged [multiple-indirection]

21 questions
0
votes
2 answers

Do more levels of indirection have a performance impact in C

If I have a structure containing an array of structures.... and on config.data.item[3].userFunction(); is it better to access with itemType * item = &config.data.item; item[3].userFunction(); item[4].userFunction(); or is this just the same as…
0
votes
2 answers

3d array allocation by void function

I obtain a Segmentation Fault when i=0 and j=2; But I don't know why ! Could you help me ? That's my function : void allocationdynamiquetableautroisdimdentier(int**** Matrice,int nbniveau, int nbligne, int nbcolonne) { int i,j; *Matrice=(int***)…
giovedy
  • 123
  • 2
  • 4
  • 10
0
votes
0 answers

Ideas for simplifying design/removing a level of indirection in method calls

In the following bit of code below (full version of ideone) , the pointers to the methods Container::void updateFoo and Container::void updateBar are registered in a map m_updateMethod. These methods simply call Foo::update and Bar::update…
Olumide
  • 5,397
  • 10
  • 55
  • 104
-1
votes
2 answers

C Multiple Indirection

I am currently watching course about pointers in C and I have a question about multiple indirection. I understood what multiple indirection is and that is ok, but I ran on piece of code and I tried to do the same thing on a little different way and…
-1
votes
4 answers

Weird Pointer issue in C++

I'm running into a VERY frustrating pointer issue. I previously posted here: 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…
-1
votes
1 answer

How many levels of indirection on Multidimensional Arrays are there?

I am using Microsoft Visual Studio Express 2013, trying to make this something... The code actually works out, but still, there is an error, with the code C4047: 'char *' differs in levels of indirection from 'char[24][50]' Is that so? Disregarding…
Utkan Gezer
  • 3,009
  • 2
  • 16
  • 29
1
2