Challenge: Nested Structs
Oppgave
Swipe to start coding
Practice defining and using nested structs to organize related data.
- Define a struct named
Addresswith a membercityof typestd::string. - Define a struct named
Companywith a memberaddressof typeAddress. - Write a function named
printCompanyCitythat takes aCompanyas a parameter and returns astd::stringwith the value of thecitymember in the format:Company city: <city>.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 8.33
Challenge: Nested Structs
Sveip for å vise menyen
Oppgave
Swipe to start coding
Practice defining and using nested structs to organize related data.
- Define a struct named
Addresswith a membercityof typestd::string. - Define a struct named
Companywith a memberaddressof typeAddress. - Write a function named
printCompanyCitythat takes aCompanyas a parameter and returns astd::stringwith the value of thecitymember in the format:Company city: <city>.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2
single