Hi,
I declare the CArray variable array as follows in the KassaDlg.h file:
class CKassaDlg : public CDialog
{
// Construction
public:
CKassaDlg(CWnd* pParent = NULL); // standard constructor
CArray <CProducten, CProducten&> array; //declaration of array variable
// Dialog Data
//{{AFX_DATA(CKassaDlg)
enum { IDD = IDD_KASSA_DIALOG };
//}}AFX_DATA
...
I want to use the variable array in the following member function:
void CArtikelDlg::OnButtonvoegToe()
{
// TODO: Add your control notification handler code here
CProducten product; //tijdelijk product aanmaken
m_ArtBarcode = product.barcode;
m_ArtNaam = product.naam;
m_ArtPrijs = product.prijs;
m_ArtStock = product.stock;
array.Add(product);
}
this is in the file called: ArtikelDlg.cpp
In this file, I included the following header files:
#include "stdafx.h"
#include "Kassa.h"
#include "KassaDlg.h" //for use of the array variable, "I THOUGHT !!!!!
#include "ArtikelDlg.h"
#include "LeveringenDlg.h"
#include "Producten.h"
#include <afxtempl.h> //for use of CArray
now when i compile i always get the following errors:
:\Documents and Settings\josphin1\Mijn documenten\PROFCT info\Kassa\ArtikelDlg.cpp(66) : error C2065: 'array' : undeclared identifier
C:\Documents and Settings\josphin1\Mijn documenten\PROFCT info\Kassa\ArtikelDlg.cpp(66) : error C2228: left of '.Add' must have class/struct/union type
WHAT CAN I DO ???
I declare the CArray variable array as follows in the KassaDlg.h file:
class CKassaDlg : public CDialog
{
// Construction
public:
CKassaDlg(CWnd* pParent = NULL); // standard constructor
CArray <CProducten, CProducten&> array; //declaration of array variable
// Dialog Data
//{{AFX_DATA(CKassaDlg)
enum { IDD = IDD_KASSA_DIALOG };
//}}AFX_DATA
...
I want to use the variable array in the following member function:
void CArtikelDlg::OnButtonvoegToe()
{
// TODO: Add your control notification handler code here
CProducten product; //tijdelijk product aanmaken
m_ArtBarcode = product.barcode;
m_ArtNaam = product.naam;
m_ArtPrijs = product.prijs;
m_ArtStock = product.stock;
array.Add(product);
}
this is in the file called: ArtikelDlg.cpp
In this file, I included the following header files:
#include "stdafx.h"
#include "Kassa.h"
#include "KassaDlg.h" //for use of the array variable, "I THOUGHT !!!!!
#include "ArtikelDlg.h"
#include "LeveringenDlg.h"
#include "Producten.h"
#include <afxtempl.h> //for use of CArray
now when i compile i always get the following errors:
:\Documents and Settings\josphin1\Mijn documenten\PROFCT info\Kassa\ArtikelDlg.cpp(66) : error C2065: 'array' : undeclared identifier
C:\Documents and Settings\josphin1\Mijn documenten\PROFCT info\Kassa\ArtikelDlg.cpp(66) : error C2228: left of '.Add' must have class/struct/union type
WHAT CAN I DO ???