Menu

#3 Support acessing all the struct members through ->

closed-fixed
None
5
2011-03-13
2010-08-10
No

Consider the scenario

struct Student
{
var id =21
Subjet subject

}
struct Sujbect
{
var name = "Mathematics"
}

accessing subject name from student reference throws null pointer exception
Student stud
Subject sub
stud->subject = sub

Try to acess name as follows.
stud->subject->name

Expected result
--------------------------------
It should display "Mathematics"

Actual result
--------------------------------
It throws Nullpointerexception

Discussion

  • Manoranjan  Sahu

    Manoranjan Sahu - 2010-08-10
    • assigned_to: nobody --> msahu98
     
  • Manoranjan  Sahu

    Manoranjan Sahu - 2011-03-13
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB