Loading ...
Sorry, an error occurred while loading the content.

problem

Expand Messages
  • vidya_srinivas2000@yahoo.co.in
    there is a structure serial_channel,whose first element is a pointer to another structure which has pointers to functions. now if i declare a variable int x
    Message 1 of 5 , Mar 12, 2001
    • 0 Attachment
      there is a structure serial_channel,whose first element is a pointer
      to another structure which has pointers to functions.
      now if i declare a variable int x and do the following:
      serial_channel *y = (serial_channel *)x
      what will happen to the members of serial_channel?
    • Damarugendra M
      whqat U are assigning to is the pointer var and assigning an integer which dubs as a memory location pointer to a struct = integer this probably makes the
      Message 2 of 5 , Mar 13, 2001
      • 0 Attachment
        whqat U are assigning to is the pointer var and assigning an integer
        which dubs as a memory location

        pointer to a struct = integer

        this probably makes the struct data unavilable.
        and the memory is leaked if U do not have other methods to access
        th data.

        if U use ,
        y->function();

        the result is unpredictable (depending on te value of x, there is a
        probability of approx 1/(4Gb) for x being miraculaslly equal the address of
        the structure :-) ) usually the output may be

        Segmentation fault

        ---------------------------------

        On Tuesday 13 March 2001 9:51, you wrote:

        > > there is a structure serial_channel,whose first element is a pointer
        > to another structure which has pointers to functions.
        > now if i declare a variable int x and do the following:
        > serial_channel *y = (serial_channel *)x
        > what will happen to the members of serial_channel?
      • Tom Nicholas
        You are assigning the value of the integer x to the pointer y. Nothing will happen to serial_channel, but y will most likely be useless due to its pointing at
        Message 3 of 5 , Mar 13, 2001
        • 0 Attachment
          You are assigning the value of the integer x to the pointer y. Nothing will
          happen to serial_channel, but y will most likely be useless due to its
          pointing at something that is not a serial_channel (depending on how/if you
          initialized x).

          Tom
          ----- Original Message -----
          From: <vidya_srinivas2000@...>
          To: <LINUX_Newbies@yahoogroups.com>
          Sent: Monday, March 12, 2001 8:21 PM
          Subject: [LINUX_Newbies] problem


          > there is a structure serial_channel,whose first element is a pointer
          > to another structure which has pointers to functions.
          > now if i declare a variable int x and do the following:
          > serial_channel *y = (serial_channel *)x
          > what will happen to the members of serial_channel?
          >
          >
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
        • inderpreet singh
          Hi to all i am inderpreet singh i am facing a problem i am not able to install linux on my sata drive please help me need to install it urgent??????????
          Message 4 of 5 , Oct 31, 2005
          • 0 Attachment
            Hi to all
            i am inderpreet singh
            i am facing a problem
            i am not able to install linux on my sata drive
            please help me need to install it urgent??????????



            thankyou
            in advance


            ---------------------------------
            Yahoo! FareChase - Search multiple travel sites in one click.

            [Non-text portions of this message have been removed]
          • Joshua Davis
            In order to help you we need more info, like what the proplem was. You may want to enable safe settings, or some other mode like that. But it would help if we
            Message 5 of 5 , Oct 31, 2005
            • 0 Attachment
              In order to help you we need more info, like what the
              proplem was. You may want to enable safe settings, or
              some other mode like that. But it would help if we
              knew the distro you are using and the error message(s)
              you got.

              --- inderpreet singh <meetinderpreet19@...>
              wrote:

              > Hi to all
              > i am inderpreet singh
              > i am facing a problem
              > i am not able to install linux on my sata drive
              > please help me need to install it urgent??????????
              >
              >
              >
              > thankyou
              > in advance
              >
              >
              > ---------------------------------
              > Yahoo! FareChase - Search multiple travel sites in
              > one click.
              >
              > [Non-text portions of this message have been
              > removed]
              >
              >


              Joshua Davis
              ----------------------------------
              Visit my website:
              www.freewebs.com/onedavis



              __________________________________
              Yahoo! FareChase: Search multiple travel sites in one click.
              http://farechase.yahoo.com
            Your message has been successfully submitted and would be delivered to recipients shortly.