Click here to Skip to main content
15,887,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionstd c++ structures Pin
Peter Charlesworth3-Mar-06 3:29
Peter Charlesworth3-Mar-06 3:29 
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 
Define a constructor for your struct that takes name, eye_color and height as parameters (and has default values for all of them).
struct person
{
    string name;
    int eye_colour;
    float height;
    person(const string& n = "" , int e = -1 , float h = 0.0F);
};
person::person(const string& n, int e, float h)
: name(n), eye_color(e), height(h)
{}

Now you can create new instances of person easily:
person* spouse;
string newpersonname;
cin.get(newpersonname, 15);
cin.ignore(16,'\n');
spouse = new person(newpersonname);

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 
QuestionMouse hook Pin
kk_mfc3-Mar-06 1:18
kk_mfc3-Mar-06 1:18 
AnswerRe: Mouse hook Pin
Naveen3-Mar-06 2:21
Naveen3-Mar-06 2:21 
GeneralRe: Mouse hook Pin
kk_mfc5-Mar-06 18:44
kk_mfc5-Mar-06 18:44 
GeneralRe: Mouse hook Pin
Naveen6-Mar-06 1:37
Naveen6-Mar-06 1:37 
Questionline count Pin
caykahve3-Mar-06 1:06
caykahve3-Mar-06 1:06 
AnswerRe: line count Pin
toxcct3-Mar-06 1:35
toxcct3-Mar-06 1:35 
GeneralRe: line count Pin
caykahve3-Mar-06 2:14
caykahve3-Mar-06 2:14 

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.