Gast
#350001
Hallo habe eine Struktur
typedef struct{
int* i
}STRUKTUR;
jetzt ist klar, lege ich eine Struktur an sollte das so
funktionieren..
int k;
const STRUKTUR s1 = {&k};
nur habe ich jetzt einen int* der je nach einer Auswahl auf eine andere
int Variable zeigt, wie lege ich jetzt eine const Struktur an die mir
dann jeweils auf die richtige Variable zeigt.
int* k;
const STRUKTUR s1 = {??k};
void main()
{
int moeglichkeit1 = 0, moeglichkeit2 = 2;
int auswahl = 0;
switch(auswahl)
{
case 0:
k = &moeglichkeit1;
break;
default:
k = &moeglichkeit2;
break;
}
}