Code:typedef struct Node { value_t valueof; } Node; typedef struct BranchNode { struct BranchNode *left_node; struct BranchNode *mid_node; struct BranchNode *right_node; struct Node *left_val; struct Node *right_val; } BranchNode; While I try to access data member in the below NodeAll function, it gives error error: error: request for member 'Node' in 'newBranchNode->TreeNode::left_val', which is of non-class type 'DataNode*' Can someone tell me how to access this nested pointer to member structure for non class type? BranchNode* NodeAll(BranchNode *root, int val) { BranchNode* newBranchNode; BranchNode *BranchNodeptr; newBranchNode = newBranchNode; newBranchNode->left_node = NULL; newBranchNode->right_node = NULL; newBranchNode->mid_node = NULL; newBranchNode->left_val.Node->valueof; // error here newBranchNode->right_val.Node->valueof; return newBranchNode; }