Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Array of Structures
Name: VBNOVICE Date: April 29, 2003 at 19:26:19 Pacific OS: Windows XP CPU/Ram: Pentium 4 512 MB
Comment:
Can someone help me how I can search a one dimensional array of structures? This is what I have so far...but I can not figure out how to display the appropriate grade.
Structure GradeStruc Public strGrade As String Public intPoints As Integer End Structure 'Declare Array of Structure Dim udtGradeScale(4) As GradeStruc 'Declare Variables Dim intX As Integer, intSearchfor As Integer 'Code Display Button Click Private Sub DisplayButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DisplayButton.Click 'populate array udtGradeScale(0).strGrade = "F" udtGradeScale(0).intPoints = 0 udtGradeScale(1).strGrade = "D" udtGradeScale(1).intPoints = 300 udtGradeScale(2).strGrade = "C" udtGradeScale(2).intPoints = 350 udtGradeScale(3).strGrade = "B" udtGradeScale(3).intPoints = 400 udtGradeScale(4).strGrade = "A" udtGradeScale(4).intPoints = 450 intSearchfor = Val(Me.PointsTextBox.Text)
Summary: I am having problems doing an alphabetical sort on names in an array of structures (List) each of which contains a name and a number e.g.: struct record{ char studName[50]; int studMark; }; str...
Summary: Hi, I want to create an array of STRUCTREs which I will read from a file. So in this file I might have a computer structure, microwave structure, TV... I don't know how many there ar...
Summary: The problem is you are declaring an array of character pointers, but you aren't initializing them to anything. I created a structure and made sure the user and password strings are larger than anythi...