Thread: One more question on struct and pointer...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    54

    One more question on struct and pointer...

    Hai friends one more question on struct
    Code:
    #include<stdio.h>
    struct node
    {
    int i;
    int *j;
    };
    main()
    {
    struct node *ptr;
    ptr->i=10;
    ptr->(*j)=20;/*i am thinking that it is not possible can any one tell me that how to do this*/
    }
    now i am not having compiler so i am asking to you members so please tell me how to access that pointer in the structure
    Last edited by sreeramu; 12-06-2007 at 07:40 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory issue
    By t014y in forum C Programming
    Replies: 2
    Last Post: 02-21-2009, 12:37 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. towers of hanoi problem
    By aik_21 in forum C Programming
    Replies: 1
    Last Post: 10-02-2004, 01:34 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM