#include <iostream>using namespace std; class Node{ public: char character;};class Tree{ public: Tree() { } Node* nodes[26];};int main() { Tree* t = new Tree(); t->nodes[0].character = 'a'; //cout << "\"" << t->nodes[0]->character << "\"";}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:20:14: error: request for member ‘character’ in ‘t->Tree::nodes[0]’, which is of pointer type ‘Node*’ (maybe you meant to use ‘->’ ?) t->nodes[0].character = 'a'; ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!