I can not access control of window form from another class in c++
|
i have some forms and one class(queue) in my project and i want to take the information of window form(Add.h) from class(queue) but when I include form(Add.h) in class(queue) and create object of form then it show that identifier "Add" is undefined
|
|
i have some forms and one class(queue) in my project and i want to take the information of window form(Add.h) from class(queue) but when I include form(Add.h) in class(queue) and create object of form then it show that identifier "Add" is undefined
Add.h
Code:
#include<iostream>
#include"queue.h"
using std::cout;
using std::cin;using std::endl;
Add.cpp
queue.h
Code:
#include<iostream>
#include"Add.h"
#include"MMenu.h"
usingnamespace std;
classNodeType{
public:
Add info;//error identifier Add is undefiened
NodeType*link;
};
classqueue
{
public:
queue();
void enqueue(Add std);//error identifier Add is undefiened
void display();
~queue();
};
queue::queue(){}
queue::~queue(){}
voidqueue::display(){}
voidqueue::enqueue(Add std){}//error identifier Add is undefiened
queue.cpp
i just started the code and want to get the link between queue class and add form but its show me error "identifier Add is undefined" and if i created another form and include in queue class then also show me error. it seems like when link between class to class is working but class to form is not working.
|