Thread: Templates and arrays of Nodes

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195

    Templates and arrays of Nodes

    Im making a tree type structure, it has 26 branches, each for a letter of the alphabet. i was wondering how can i make an array of pointers to a Node struct.

    Code:
    template <class T>
    struct Nodes
    {
    ...
    };
    typedef struct Nodes Node;
    
    template <class T>
    class Foo
    {
      Node *list[26];
    public:
    ...
    };
    will this work?
    Last edited by Mastadex; 09-30-2005 at 02:40 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How properly get data out of vectors of templates?
    By 6tr6tr in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 10:35 AM
  2. Dynamic Memory and Arrays
    By Loctan in forum C++ Programming
    Replies: 2
    Last Post: 08-05-2006, 04:09 AM
  3. Templates
    By arjunajay in forum C++ Programming
    Replies: 4
    Last Post: 11-16-2005, 11:17 AM
  4. templates, unresolved external error
    By silk.odyssey in forum C++ Programming
    Replies: 9
    Last Post: 06-09-2004, 04:39 PM
  5. Casting with character arrays
    By Trauts in forum C++ Programming
    Replies: 3
    Last Post: 05-02-2003, 09:47 PM