[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C++ Code

Posted on 2011-02-15
4
Medium Priority
?
331 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

834 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