View Single Post
Old Jan 15th, 2006, 4:29 PM   #1
linuxpimp20
Hobbyist Programmer
 
Join Date: May 2005
Location: ma
Posts: 130
Rep Power: 4 linuxpimp20 is on a distinguished road
Writing code intended for a GUI Developing program

hi. i've just been messing around with a few simple programs today to refresh my memory on C++. I decided to write a simple one and try to use a GUI development program to see if i can make a gui for it. now when you use the GUI developer to attach code to the widgets can you only attach a function for it to execute? Here is the simple program i was tryiing to make a GUI for.

#include <iostream>

using namespace std;

 int main()
{
	int NUM;
	
	cout << "Input a number: ";
	cin >> NUM;
	cout << "You entered " << NUM << "\n";
}

now because i know the input a number would be a input box would i have the first cout and cin in a function say input() and then have the widget use that function for the input box? Or is that an unecessary step? Thanks for any replies in advance.
linuxpimp20 is offline   Reply With Quote