Linked Lists debugger question



Hello,

I am experimenting a little with linked lists. I am using Microsoft Visual
C++ .NET the old one (frame works 1.1... 1998-2002) to test my C code.

Anyhow, I have entered the following:
=============================================
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>

#include "Main.h" //ACM152 HEADER FILE

struct list {
int value;
struct list *next;
};


int main(void)
{
struct list n1, n2;

n1.next = &n2;
return 0; //Breakpoint here!
}
==============================================

My question is, in debug mode, when my program stops at the breakpoint and
I put my cursor over the "n1.next" I read this:

n1.next = 0x0012fec0 {value=0xcccccccc next=0xcccccccc {value=??? next=???}}

I guess that the 0x0012fec0 is the address of the n2 strucure which is
stored into n1.next. But I don't understand what the rest means! I never
assigned a value to "value" and yet why does it show that value is equal to
0xcccccccc ?
And what does the "next=0xcccccccc" mean?

And the doozee! what does the {value=??? next=???} mean?

Any feedback appreciated.

--
Best regards
Robert
.



Relevant Pages

  • Re: Problems with understanding linked lists
    ... > I still have some problems with understanding linked lists. ... > understand the principe of pointers. ... void addTail// This function provides the possibility to add ... int choice; ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Problem with a linked list
    ... > void getline(char s, int lim) ... to the issue of linked lists. ... tail pointer" as a reference to the link point, ...
    (comp.lang.c)
  • C Linked List -
    ... that can be performed on linked lists that would help me learn more? ... void insert (NodePtr *, int); ... NodePtr newPtr, prevPtr, currPtr; ...
    (comp.lang.c)
  • Re: Palindrome
    ... it's a palindrome or not, using linked lists? ... whether str is a palindrome */ ... int ispal ...
    (comp.programming)
  • Re: Palindrome
    ... it's a palindrome or not, using linked lists? ... whether str is a palindrome */ ... int ispal ...
    (comp.programming)

Loading