Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Algoritmi e strutture dati > HELP "struct"
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
pintu
.illuminato.

User info:
Registered: Jul 2010
Posts: 248 (0.05 al dì)
Location: Novara
Corso: informatica
Anno:
Time Online: 2 Days, 0:46:30 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
HELP "struct"

Se io facessi queste dichiarazioni..

struct A {
int x
struct B *pointer
}

struct B {
struct A *pointer
struct B *pointer
}


avrei dei problemi in compilazione? In teoria "leggendo" struct A mi troverei ad avere struct B che non è ancora stata dichiarata e quindi il compilatore non la riconosce giusto? Se si in che modo si può ovviare al problema?

12-01-2012 18:25
Click Here to See the Profile for pintu Click here to Send pintu a Private Message Find more posts by pintu Add pintu to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
vivian.souza
...

User info:
Registered: Oct 2008
Posts: 15 (0.00 al dì)
Location: Milano
Corso: Informatica - F49
Anno: Terzo
Time Online: 1 Day, 15:40:40 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Basta che dichiari prima il prototipo della struct B.

struct B;

struct A {
int x
struct B *pointer
}

struct B {
struct A *pointer
struct B *pointer
}

12-01-2012 22:41
Click Here to See the Profile for vivian.souza Click here to Send vivian.souza a Private Message Find more posts by vivian.souza Add vivian.souza to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 17:53.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.049 seconds (81.29% PHP - 18.71% MySQL) con 25 query.