This content has been marked as final. Show 5 replies
In standard C++, you can write text to a file or to the standard output streams cout or cerr. For example,
std::cout << "Hello\n";
will write the text "hello" and a newline to the standard output. By default on Solaris and Linux, that will be the terminal window where you ran the program.
If you want to create a special output window or other GUI component, you will need an additional graphical library that provides a programming interface to do what you want. Oracle Solaris Studio does not provide any such libraries. Searching for "GUI library" or "GUI libraries" will turn up quite a few possibilities.
One popular solution is the open source Qt project.
Studio C++ implements standard C++ for Unix and Linux. ShowMessage is not a feature of standard C++, Unix, or Linux.
ShowMessage is a feature of other languages, like Delphi and Java. It puts up a message box, which in turn requires a window system and GUI programming interface, which is why I referred you GUI libraries. They might not have a facility spelled exactly ShowMessage, but they will have something equivalent. For example, if you were using Microsoft Visual C++ to program a Windows application, you still wouldn't have ShowMessage. But the Windows application library provides MessageBox, having equivalent functionality.
Qt, which I mentioned earlier, has a function showMessage that is part of statusBar.
Not all programming languages provide the same facilities, and where facilities overlap, sometimes the details are different. C++ in particular has no built-in facility for GUI programming. For that, you need to get an add-on library.