down votefavorite
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
down votefavoritei 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:#pragma onceCode:#include<iostream> #include"queue.h" using std::cout; using std::cin;using std::endl;
Add.cpp
Code:#include"Add.h"
queue.h
Code:#pragma onceCode:#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
Code:#include"queue.h"
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.