dimanche 3 juin 2018

How to initialize a char member variable of a class?

I am having trouble assigning value to a character class member:

class Node
{
 public:
    char c;
};

void main(void)
{   
    Node *node;
    node->c = 'a';
}

Aucun commentaire:

Enregistrer un commentaire