Data File Handling question related to putting of pointer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danish7627
    New Member
    • Aug 2015
    • 1

    Data File Handling question related to putting of pointer

    How does the compiler know where to put pointer like in following example-
    details of student-1. Roll no.,2.Student name ,3.Percentage

    123ABC98213def8 8458fgh100

    In this example how will the compiler know to put pointer after '...98'as there is int datatype next to it which could also come in category of percentage though it is part of roll no. of second student.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    The compiler is not involved with the data. Only you are in control of this situation.

    The example you show is readable only if you already know what the data format is. If you don't know what the format is, hen this is just gibberish.

    Look at at your struct that was used to read the data. That is what told the compiler how to fill the struct variables.

    If this is an array of struct variables, then read this: http://bytes.com/topic/c/insights/77...rrays-revealed

    Comment

    Working...