Thread: Creating Linked list in .NET

  1. #1
    Registered User
    Join Date
    May 2004

    Post Creating Linked list in .NET


    I am using VS.NET 2003 and am making a single document MFC application. I need to use linked lists but am not able to declare it in the header file. This is the code that is producing a compilation error:

    #include <list>


    list<CPoint> mainList;

    The compilation error is: Missing storage class or type specifier.

    How do I declare and use a linked list?


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    We can't tell much from two dis-jointed statements, but
    - did you include a namespace
    - does it know what a CPoint is yet.

    Post code you actually tried to compile, not just the bits you think are wrong
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  2. single linked list to double linked list (help)
    By Countfog in forum C Programming
    Replies: 8
    Last Post: 04-29-2008, 08:04 PM
  3. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  4. Template Class for Linked List
    By pecymanski in forum C++ Programming
    Replies: 2
    Last Post: 12-04-2001, 09:07 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM