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

C / C++ / MFC

 
AnswerRe: How to count pages in PDF file using VC++ Pin
Richard MacCutchan23-Dec-12 22:04
mveRichard MacCutchan23-Dec-12 22:04 
AnswerRe: How to count pages in PDF file using VC++ Pin
Jijo.Raj26-Dec-12 23:29
Jijo.Raj26-Dec-12 23:29 
QuestionHow to implement C++ raw string literals in VIsual C++ 2010? Pin
Falconapollo22-Dec-12 18:03
Falconapollo22-Dec-12 18:03 
Questionproblems returning/printing poiner Pin
doughyi8u20-Dec-12 14:16
doughyi8u20-Dec-12 14:16 
AnswerRe: problems returning/printing poiner Pin
Jochen Arndt20-Dec-12 21:15
professionalJochen Arndt20-Dec-12 21:15 
AnswerRe: problems returning/printing poiner Pin
Richard MacCutchan20-Dec-12 22:47
mveRichard MacCutchan20-Dec-12 22:47 
GeneralRe: problems returning/printing poiner Pin
Jochen Arndt20-Dec-12 23:07
professionalJochen Arndt20-Dec-12 23:07 
GeneralRe: problems returning/printing poiner Pin
Richard MacCutchan21-Dec-12 0:19
mveRichard MacCutchan21-Dec-12 0:19 
QuestionC++ ownerdrawfixed combobox "header" Pin
NoviceEx19-Dec-12 2:49
NoviceEx19-Dec-12 2:49 
AnswerRe: C++ ownerdrawfixed combobox "header" Pin
jeron119-Dec-12 4:19
jeron119-Dec-12 4:19 
QuestionHow to make a project resolution independent.? Pin
mbatra3118-Dec-12 23:56
mbatra3118-Dec-12 23:56 
AnswerRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 0:29
professionalJochen Arndt19-Dec-12 0:29 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 0:39
mbatra3119-Dec-12 0:39 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 0:52
professionalJochen Arndt19-Dec-12 0:52 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 1:25
mbatra3119-Dec-12 1:25 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 1:33
professionalJochen Arndt19-Dec-12 1:33 
GeneralRe: How to make a project resolution independent.? Pin
mbatra3119-Dec-12 1:44
mbatra3119-Dec-12 1:44 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 2:06
professionalJochen Arndt19-Dec-12 2:06 
AnswerRe: How to make a project resolution independent.? Pin
Alan Balkany19-Dec-12 4:25
Alan Balkany19-Dec-12 4:25 
GeneralRe: How to make a project resolution independent.? Pin
Kimcopeland2-Apr-21 16:18
Kimcopeland2-Apr-21 16:18 
QuestionASM with stams library of C ++ Pin
Gurunathkudalkar18-Dec-12 21:15
Gurunathkudalkar18-Dec-12 21:15 
AnswerRe: ASM with stams library of C ++ Pin
CPallini18-Dec-12 22:19
mveCPallini18-Dec-12 22:19 
Questionerror C2228 "must have class/struct/union" Pin
alaaan7318-Dec-12 4:55
alaaan7318-Dec-12 4:55 
AnswerRe: error C2228 "must have class/struct/union" Pin
Chris Losinger18-Dec-12 5:19
professionalChris Losinger18-Dec-12 5:19 
AnswerRe: error C2228 "must have class/struct/union" Pin
Richard MacCutchan18-Dec-12 7:09
mveRichard MacCutchan18-Dec-12 7:09 
You have:
C++
bool Flight::reserveSeat(Passenger psngr, bool smoker)
{
   Passenger.setPassengerName(psngr.getPassengerName());
   passenger.setPassportNumber(psngr.getPassportNumber());
   passenger.setContactNumber(psngr.getContactNumber());
   reservations.smokerSeat=smoker;
 
}

which makes little sense. you are using both Passenger (with upper case P), and passenger (with lower case p) to refer to something. But what, why would you try to set the value of an item in an object from the value taken from that object? Similarly the statement
C++
reservations.smokerSeat=smoker;

make little sense as reservations is a pointer to a pointer (of something). I think you are a little confused about your classes and how they connect to each other.
One of these days I'm going to think of a really clever signature.

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.