Thread: using "SortedList" class in nachos

  1. #1
    Registered User
    Join Date
    Oct 2010
    Location
    San Francisco, CA
    Posts
    5

    using "SortedList" class in nachos

    Hello,

    I am trying to sort threads by priority using SortedList class. I having been running into problems using the SortedList class that I do not run into when using the List class. I have assumed the declaring both is the same and I have been doing the following:

    Code:
    readyList = new SortedList<Thread *>;
    to create a new instance of a SortedList. I have been getting compile errors, however, when I do the following:

    Code:
    readyList = new List<Thread *>;
    It works just fine. List is the base class of SortedList.


    Is there anything wrong with my instance creation using SortedList? How might this be rectified?

    Thank you :-)

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    The errors that you are getting are important. They are telling you what is wrong.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with FIFO QUEUE
    By jackfraust in forum C++ Programming
    Replies: 23
    Last Post: 04-03-2009, 08:17 AM
  2. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  3. Defining derivated class problem
    By mikahell in forum C++ Programming
    Replies: 9
    Last Post: 08-22-2007, 02:46 PM
  4. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM