Can anybody here tell me please how to display a notification/message box in c++.
suppose i'm making a program for factorial of a no. and i want to display the result in a message box with msg..." Factorial of No. is <fact>".

help me please!!!

Recommended Answers

All 3 Replies

C++ doesn't do graphical elements. You'll need to use a GUI library of some sort, though upgrading to a compiler that wasn't designed for MS-DOS would greatly facilitate your search for a working library..

I would suggest the Qt GUI tools, if you're working on Eclipse, with the Qt eclipse integration plugin.
Here, this might help you: Lecture 7: QT.

@adityawkhare: You can't generate a message box like you might see on other MS-Windows programs because Turbo C can't access any of the win32 api functions -- its too old of a compiler. Nor can you use any modern GUI library like QT Gui tools previously mentioned.

About the best you can do with your compiler is to just call printf() to display the message. You might also write your own function that would erase a rectangle on the screen, put a box around it, then print the message inside that rectangle.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.