I'm getting a strange error indicating that head isn't recognized even though I include the header file "class_list.h" in my class_list.cpp file. I've tested to see if I can declare other c_node pointer types within my implementation files for the function and it doesn't give me any trouble except when I declare c_node pointer types in private. Could anyone help me understand what I'm doing wrong? **Note** messages.h has <cstring>, <cctype>, <iostream> included.
/*
The purpose of this class is to contain all of the chatrooms and messages between users.
The chatrooms will store the users involved in each chatroom and the messages each user has sent.
*/
#include "messages.h"
struct c_node
{
char * c_room_name;
user * users;
c_node * next;
//class of messages
//messages chat_message;
};
class chat_list
{
public:
//constructors and deconstructor
chat_list();
~chat_list();
//called from client program. Sends the chat_name to the set_username
//function invokes the set_username function to store the contents of
//username into the class objects
//Sets the name of the chatroom and creates a new LLL
//The title of this LLL features as the chatroom
bool create_chatroom(constchar * room_name, user & users_from);
private:
c_node * head;
c_node * tail;
};