cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Trees
Trees
Apr 26, 2014 at 7:40pm UTC
voidStream
(9)
Why can I call the array inside of my main function;
struct Node
{
int data[3][3];
Node* next;
}
main ()
{
Node *head;
head->data[0][1] = 5;
}
Apr 26, 2014 at 7:44pm UTC
prestokeys
(357)
You need to allocate memory with new.
Node *head = new Node;
Topic archived. No new replies allowed.