Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. visual basic question on arrays

visual basic question on arrays

Scheduled Pinned Locked Moved Visual Basic
game-devdata-structuresquestion
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DxSolo
    wrote on last edited by
    #1

    i am in the process of writing a game called bunco and i have hit one of those walls. Basically i have an 12 element array and at the end of the game i need to find out which element holds the highest value,which holds the second highest, and what holds the third highest but i also need to find out if there is a tie for any of those spots now i know the long way to do this but was hoping that someone might know a shorter and more effiecient way

    D 1 Reply Last reply
    0
    • D DxSolo

      i am in the process of writing a game called bunco and i have hit one of those walls. Basically i have an 12 element array and at the end of the game i need to find out which element holds the highest value,which holds the second highest, and what holds the third highest but i also need to find out if there is a tie for any of those spots now i know the long way to do this but was hoping that someone might know a shorter and more effiecient way

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      If in VB.NET, use Array.Sort. If in VB6, search the web for a sort routine.


      It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

      D 1 Reply Last reply
      0
      • D Daniel Turini

        If in VB.NET, use Array.Sort. If in VB6, search the web for a sort routine.


        It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)

        D Offline
        D Offline
        DxSolo
        wrote on last edited by
        #3

        thats not exactly what im looking for. it is vb6 and the reason i came here was to find some help normally i would just use this one sort function but the problem is the elements in the array are all instances of the player class so not only do i need to find out the 1st 2nd and 3rd place winners but i need to know the names of them which makes it a little more noodle scratching than a normal array and the thing that sucks most is i can see the solution on the back of my brain well anyways if anyone has any ideas

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups