Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C++ Code

Posted on 2011-02-15
4
Medium Priority
?
329 Views
Last Modified: 2012-08-14
if (MessageDlg(prompt, mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes)

What does the code in bold mean? This is Borland C++, though it shouldn't matter. I am trying to figure if TMsgDlgButtons() is accepting parameters?? or is the << operator used as left shit bit operator?? Or anything else. Pls assume very little C++ experience.
0
Comment
Question by:Mydeen Yussouf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 34897517
It looks like whatever TMsgDlgButtons() returns (whether it is a function or a constructor for that type) it has overloaded the << operator to allow the setting of values in one operation. In this case it looks like the object is being primed to accept a Yes and No user input (so, it probably displays those buttons).
0
 
LVL 1

Author Comment

by:Mydeen Yussouf
ID: 34897826
This is what the official help document says:

TMsgDlgButtons defines a set of values used by MessageDlg and MessageDlgPos.

Unit

Dialogs

enum TMsgDlgBtn { mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp };
0
 
LVL 1

Author Comment

by:Mydeen Yussouf
ID: 34916756
Can someone help me link the Help page with the actual usage in C++ terms?
0
 
LVL 40

Expert Comment

by:evilrix
ID: 34921228
State what is it you specifically don't understand and I'll try to make it clearer for you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question