/
Forside
/
Teknologi
/
Udvikling
/
C/C++
/
Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Find en bruger
Stil et spørgsmål
Skriv et tip
Fortæl en ven
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
C/C++
#
Navn
Point
1
BertelBra..
2425
2
pmbruun
695
3
Master_of..
501
4
Bech_bb
500
5
kyllekylle
500
6
jdjespers..
500
7
gibson
300
8
scootergr..
300
9
molokyle
287
10
strarup
270
Converting pointers
Fra :
Andreas Vinther
Dato :
27-05-07 15:25
I need to re-structure some code in a program I wrote som time ago
I'd like to reuse my code instead of having to rewrite the lot. That
leads me to my question.
I have the following two pointers:
char ***pppValues;
char **ppValues;
The relation between the two is:
ppValues = *pppValues;
Now I need to rewrite the following statement:
ppValues[index]
So that I have a similar statement with the same value/meaning, but it
must be rewritten to use pppValues instead of ppValues.
I have tried the following statements without luck.
*pppValues[index]
*(pppValues[index])
*(pppValues)[index]
*((pppValues)[index])
(*pppValues)[index]
*((*pppValues)+index)
None of which provides me with the correct result.
I don't usually have problem coverting my pointers, but im tired and
can't think straight right now.
I'd be very greatful if someone takes the time to help me, as I've
stared myself blind, without getting the correct result.
If i'm som lucky that someone can spot the problem right away, I'd also
like the following statement rewritten. But it ought to be quite easy if
the statement above has been correctly rewritten.
*(unsigned long *)ppValues[index]
Thanks a lot in advance
/Andreas Vinther, Denmark.
Søg
Alle emner
Teknologi
Udvikling
C/C++
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177558
Tips :
31968
Nyheder :
719565
Indlæg :
6408914
Brugere :
218888
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2024 kandu.dk. Alle rettigheder forbeholdes.