S
Sujal
In below program, I'm getting below compilation errors
error C2621: member '_tag_nodes_::node_' of union '_tag_nodes_' has
copy constructor
error C2621: member '_tag_nodes_::linkednode_' of union '_tag_nodes_'
has copy constructor
Can anybody help me resolve this or any workaround for this?
I must need union because in my data structure only one type of node
is possible at time. So I have taken union. And ya my data structure
is still very big but i posted a fraction part here to simplify the
problem.
#include "stdafx.h"
#include <stdio.h>
#include<iostream>
#include<conio.h>
#include <list>
using namespace std;
typedef struct _tag_nodedata
{
std::string name;
std::string type;
}NODEDATAINFO;
typedef list<NODEDATAINFO> NODEDATA;
typedef struct _tag_nodeinfo
{
void *_nodeptr;
string path_;
NODEDATA data_;
}NODEINFO;
typedef struct _tag_linkednodeinfo
{
void *_nodeptr;
string linkpath_;
int queued;
int hidden;
}LINKEDNODEINFO;
typedef union _tag_nodes_
{
NODEINFO nodeinfo_;
LINKEDNODEINFO linkednode_;
}NODES;
typedef struct _unrsolvednode_
{
NODES node;
int type;
}UNRESOLVED;
int _tmain(int argc, _TCHAR* argv[])
{
getch();
}
error C2621: member '_tag_nodes_::node_' of union '_tag_nodes_' has
copy constructor
error C2621: member '_tag_nodes_::linkednode_' of union '_tag_nodes_'
has copy constructor
Can anybody help me resolve this or any workaround for this?
I must need union because in my data structure only one type of node
is possible at time. So I have taken union. And ya my data structure
is still very big but i posted a fraction part here to simplify the
problem.
#include "stdafx.h"
#include <stdio.h>
#include<iostream>
#include<conio.h>
#include <list>
using namespace std;
typedef struct _tag_nodedata
{
std::string name;
std::string type;
}NODEDATAINFO;
typedef list<NODEDATAINFO> NODEDATA;
typedef struct _tag_nodeinfo
{
void *_nodeptr;
string path_;
NODEDATA data_;
}NODEINFO;
typedef struct _tag_linkednodeinfo
{
void *_nodeptr;
string linkpath_;
int queued;
int hidden;
}LINKEDNODEINFO;
typedef union _tag_nodes_
{
NODEINFO nodeinfo_;
LINKEDNODEINFO linkednode_;
}NODES;
typedef struct _unrsolvednode_
{
NODES node;
int type;
}UNRESOLVED;
int _tmain(int argc, _TCHAR* argv[])
{
getch();
}