convert console C++ to nice GUI ????

Soldato
Joined
30 Nov 2005
Posts
13,916
hi i have written a small bit of code as a learing curve for myself to make my job easier but would like to convert to a nice little GUI window app :D

just wanna enter a few names and some data, average it and print it out in a formated way . sounds easy hey? but I dont know where to start.

some comments on my coding would be nice , ( I am a noob ! by the way)


should look like this :

textbox
text box data box
text box data box
text box data box
text box data box
text box data box
text box data box
text box data box
text box data box



>>>>>>>>>>>>here is the code I have written so far which works in console

#include <iostream>

using namespace std;

void label ();

int main ()
{

float total;
int numberOfBasics;
int basicArray [8];
float amountArray [] = {0,0,0,0,0,0,0,0,0};
float endAmount [] = {0,0,0,0,0,0,0,0,0};
cout<< "my Program\n\n\n";
cout << "Please enter the number of basics: ";
cin >> numberOfBasics;


/* cout <<"Enter the tint number: ";
int tintNumber;
cin >> tintNumber;
*/
cout <<"please enter the formula total: ";
float FormulaTotal=0;
cin >> FormulaTotal;
int x = 0;

while (x < numberOfBasics)
{
int x=0;
cout <<"Enter basic: ";
cin >> basicArray [x]; // get recipe
cout <<"Enter amount: ";
cin >> amountArray [x];
++x;
}

total = amountArray[0]+ amountArray[1] + amountArray[2]
+ amountArray[3] +amountArray[4]+amountArray[5]
+amountArray[6]+amountArray[7]+amountArray[8];
x=0;
while (x < numberOfBasics)
{
x=0;
float formTotal;
endAmount[x] = amountArray[x]/total*formTotal;
++x;
}
cout<< "\n\n\nFormula\n";

x=0;

while (x < numberOfBasics)
{
x=0;
cout<< basicArray[x];
cout<< " : ";
cout<< endAmount[x];
cout<<"\n";
++x;
}

char quit[6];
cin >> quit;
return 1;
}
 
Back
Top Bottom