PDA

View Full Version : C++, im suddenly confused...



u-noob-tu
May 22nd, 2011, 05:45 PM
so yesterday i used wxwidgets for the first time and made my first GUI (using a tutorial as my base). thing is though, it seemed to have nothing involving C++ in it. i dont know, maybe i just dont have enough experience yet, but i was really thrown off by wxwidgets. i was confused by the lack of anything i have seen before, like "cout" "int main()", and "cin.get()". is that cuz wxwidgets is just the code for the interface and not for the program itself? can someone explain it to me?

simeon87
May 22nd, 2011, 05:47 PM
wxWidgets is for creating a GUI and that's all. You'll need to add more code to make the buttons actually do something. So yes, wxWidgets is just for the graphical interface, not for the program itself.

cgroza
May 22nd, 2011, 06:30 PM
wxWidgets is a library. The "int main" is there, but is inserted at compile time by the preprocessor when you use the macro: IMPLEMENT_APP.

Every toolkit has it's learning curve, it is normal.

u-noob-tu
May 22nd, 2011, 07:29 PM
So C++ is what makes a program do something, and a toolkit is just visual representation of what it's doing? Wonder how I missed that in my C++ book. That makes a lot more sense now.

unknownPoster
May 22nd, 2011, 07:46 PM
So C++ is what makes a program do something, and a toolkit is just visual representation of what it's doing? Wonder how I missed that in my C++ book. That makes a lot more sense now.

It's not in your book because that is false.

A GUI toolkit allows your otherwise CLI application to have a Graphical User Interface.

Appropriate terminal output can be "Visual representation."