Creating a new array of poiters to functions.

This is a discussion on Creating a new array of poiters to functions. within the C++ Programming forums, part of the General Programming Boards category; Hi Im trying to create a new array of pointers to functions, ive tried many things including this: Code: bool ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    84

    Creating a new array of poiters to functions.

    Hi

    Im trying to create a new array of pointers to functions, ive tried many things including this:

    Code:
    bool (**temp)() = new bool (*[arrSize + 1])();
    but it doesnt work, :\

    can anyone explain to me what am i doing wrong??

    tks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,271
    Typedef the function pointer type, and then it will be easy. Also, use std::vector for a dynamic array.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    84
    Ok tks for the help, i forgot typecasts lol

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 08:25 PM
  2. An array of macro functions?
    By someprogr in forum C Programming
    Replies: 6
    Last Post: 01-28-2009, 07:05 PM
  3. Creating an array of pointers to int[]
    By OkashiiKen in forum C Programming
    Replies: 3
    Last Post: 09-29-2006, 07:48 PM
  4. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 09:31 AM
  5. Creating an array of object pointers
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2001, 11:01 PM

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