#Self-referencing-C

1 messages · Page 1 of 1 (latest)

wind drum
#

why is this self referencing ?
is it going through an endless recursion ?

dreamy ruinBOT
#

<@&987246683568103514> please have a look, thanks.

dreamy ruinBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

floral imp
#

the way u wrote it, each person has a father and a mother, without exception

#

but when it creates the father, that person also has a father and a mother

#

and those as well

#

u never hit the point where it stops

#

as in, adam and eve

#

for it to be correct, u have to make it "optional", so that it can eventually stop

#

for example by using Person* father, mother instead

#

then it starts as nullptr

#

instead of an actual person instance

wind drum
#

ohh

#

so i create a person with an empty father and empty mother age and name

#

ok i see

#

the filling happens in the main

#

kk gotcha ty