Creating Linked list in .NET

This is a discussion on Creating Linked list in .NET within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I am using VS.NET 2003 and am making a single document MFC application. I need to use linked lists ...

  1. #1
    axp
    axp is offline
    Registered User
    Join Date
    May 2004
    Posts
    1

    Post Creating Linked list in .NET

    Hi,

    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>

    ...

    public:
    list<CPoint> mainList;

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

    How do I declare and use a linked list?

    Thanks

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08:07 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21