Hi all.
I've been learning c++ since a few months and i'm still writing console programs. These days i've been looking a bit at the streams library, iostream and stuff, and i'm wondering if the functions that are so useful in command-line programs for inputting and outputting data (like get(),getline(),cin,cout...etc) can be also used when writing GUI programs.
My aim is to be able to write some nice graphical programs one day, so i want to know whether all the input/output techniques i am learning right now will be equally relevant later.
Thanks.
Similar techniques are useful using stringstreams, though. Here's an example Windows console program that displays a message box showing the value of an integer. Note the hideousness.
1 2 3 4 5 6 7 8 9
#include <windows.h>
#include <sstream>
int main(){
int n = 1234;
std::ostringstream os;
os << "The number is " << n;
MessageBox( 0, os.str().c_str(), 0, 0 );
}