Allocating an array of function pointers with new in C++?

Discussion in 'Computer Programming, Emulation, and Game Modding' started by StackMasher, Feb 8, 2017.

  1. StackMasher
    OP

    StackMasher GBAtemp Regular

    Member
    119
    58
    Nov 29, 2016
    Code:
    new void(*)()[]
    new void(*fp)()[]
    I've tried both of those but the compiler throws an error. Kind of annoying that I can't just use void* pointers instead of this crappy syntax
     
    Last edited by StackMasher, Feb 8, 2017
  2. evandixon

    evandixon PMD Researcher

    Member
    1,690
    813
    May 29, 2009
    United States
  3. AuburnSounds

    AuburnSounds Newbie

    Newcomer
    7
    9
    Feb 21, 2017
    France
    Managed to do it with a type def: https://ideone.com/8IZtu9