Click here to Skip to main content
15,917,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 5:56
David Crow3-Mar-06 5:56 
AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 6:18
Waldermort3-Mar-06 6:18 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 6:35
David Crow3-Mar-06 6:35 
AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 15:59
Waldermort3-Mar-06 15:59 
GeneralRe: Stack overflows Pin
Waldermort3-Mar-06 5:53
Waldermort3-Mar-06 5:53 
QuestionRe: Stack overflows Pin
David Crow3-Mar-06 5:59
David Crow3-Mar-06 5:59 
AnswerRe: Stack overflows Pin
Waldermort3-Mar-06 6:28
Waldermort3-Mar-06 6:28 
Questionstd c++ structures Pin
Peter Charlesworth3-Mar-06 3:29
Peter Charlesworth3-Mar-06 3:29 
Hi!

I am new to structures and I get how they work, sort of. And I have a question.
Let's say I've got this structure:
<br />
struct person<br />
  { string name;<br />
    int eye_colour;<br />
    float height;<br />
  };<br />
<br />
person friend,mother;<br />
person spouse;<br />


Note that eye color is defined by a number. 1 is brown, 2 is blue, 3 is green and a NULL value is
an unknown eye color, or whatever you like.

So how can I make my program create a new person, which is user-inputted?
Something like this: ?
<br />
cin.get(newpersonname, 15)<br />
cin.ignore(16,'\n')<br />
create.person (newpersonname)<br />


And how would that work for structures within structures?

I'm kinda confused on this Confused | :confused:

thanks!

Peter
AnswerRe: std c++ structures Pin
Cedric Moonen3-Mar-06 3:38
Cedric Moonen3-Mar-06 3:38 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:02
Peter Charlesworth3-Mar-06 12:02 
AnswerRe: std c++ structures Pin
Maximilien3-Mar-06 3:39
Maximilien3-Mar-06 3:39 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:06
Peter Charlesworth3-Mar-06 12:06 
AnswerRe: std c++ structures Pin
toxcct3-Mar-06 3:49
toxcct3-Mar-06 3:49 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:04
Peter Charlesworth3-Mar-06 12:04 
AnswerRe: std c++ structures Pin
markkuk3-Mar-06 12:18
markkuk3-Mar-06 12:18 
GeneralRe: std c++ structures Pin
Peter Charlesworth3-Mar-06 12:29
Peter Charlesworth3-Mar-06 12:29 
QuestionDoes kernel driver can invoke GetLogicalDriveStrings()? Pin
momer3-Mar-06 3:20
momer3-Mar-06 3:20 
Questionchanging brush attributes at runtime Pin
pc_dev3-Mar-06 2:09
pc_dev3-Mar-06 2:09 
AnswerRe: changing brush attributes at runtime Pin
Chris Losinger3-Mar-06 2:15
professionalChris Losinger3-Mar-06 2:15 
General[OT] Pin
toxcct3-Mar-06 2:35
toxcct3-Mar-06 2:35 
GeneralRe: [OT] Pin
Chris Losinger3-Mar-06 3:03
professionalChris Losinger3-Mar-06 3:03 
GeneralRe: changing brush attributes at runtime Pin
pc_dev3-Mar-06 3:26
pc_dev3-Mar-06 3:26 
GeneralRe: changing brush attributes at runtime Pin
Chris Losinger3-Mar-06 3:53
professionalChris Losinger3-Mar-06 3:53 
AnswerRe: changing brush attributes at runtime Pin
Stephen Hewitt3-Mar-06 2:17
Stephen Hewitt3-Mar-06 2:17 
AnswerRe: changing brush attributes at runtime Pin
Gary R. Wheeler3-Mar-06 12:36
Gary R. Wheeler3-Mar-06 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.