
-----------------------------------
cyberguy
Thu Nov 19, 2009 6:25 pm

Can someone help me create a gui interface for this?
-----------------------------------
# include 
# include 
# include 
# include 
#include 
# include 

using namespace std;

// Declare Global Variable

struct node {
        int Prod_Id ;
        char Prod_Name [20];
        char Prod_Category [10];
        char Prod_Supplier [20];
        float Prod_WholeSalePrice  ;   
        float Prod_RetailSalePrice ;
        float Prod_CostPrice;
        int Prod_stockcount;
        int order;
        node *next;// Pointer to next node
} product;



node *start_ptr = NULL;
node *temp1, *temp2;
node *current;

int rec_num ;


//###########################################
void addproduct () {
     
     string tempValue;
     bool ok;
     ofstream PRODUCT ("PRODUCT.txt", ios::app|ios::out);
         
     

                                  //data to be added to file
                                  //record number
         temp1 = new node;
         cout Prod_Name, tempValue.c_str());
	   PRODUCT Prod_Name 10){
			 ok=false;
			 cout Prod_Category, tempValue.c_str());
	   PRODUCT Prod_Category20){
			 ok=false;
			 cout Prod_Supplier, tempValue.c_str());
	  PRODUCT Prod_Supplier tempValue;
           temp1->Prod_WholeSalePrice = atof(tempValue.c_str());
           if (temp1->Prod_WholeSalePrice = atof(tempValue.c_str())){
              ok=true;}
           else{
                ok=false;
                cout Prod_RetailSalePrice = atof(tempValue.c_str());
           if (temp1->Prod_RetailSalePrice = atof(tempValue.c_str())){
              ok=true;}
           else{
                ok=false;
                cout Prod_stockcount = atoi(tempValue.c_str());
           if (temp1->Prod_stockcount = atoi(tempValue.c_str())){
              ok=true;}
           else{
                ok=false;
                cout order = atoi(tempValue.c_str());
           if (temp1->order = atoi(tempValue.c_str())){
              ok=true;}
           else{
                ok=false;
                cout Prod_CostPrice = atof(tempValue.c_str());
           if (temp1->Prod_CostPrice = atof(tempValue.c_str())){
              ok=true;}
           else{
                ok=false;
                cout next != NULL){  
               temp2 = temp2->next;//move to next link in chain    
         }
         temp2->next = temp1;
   }
    


}//end addPRODUCT

//**************  
void findProduct() {
     
node *current;
int target;
bool found;

     cout  target;
     found = false;
     current = start_ptr;
     if (current == NULL)
          cout 