using an int passed as parameter to declare array

Hello, this is a simple question, I hope you can help.
I'm trying to create a texture loading class for my openGL project but I'm having trouble making the texture array.


I want to pass a number to my function parameter and use that number to create an array with that number. Using a vector would be fine too, if that involves the solition.
1
2
3
4
  myFunction( NUM HERE)
   {
     GLuint textures[NUM HERE] 
   }


I keep getting an error even if I use const int& for the function parameter.
http://www.cplusplus.com/forum/beginner/167208/

You can use new or std::vector

You did not have to post on stackoverflow and here.
Last edited on
@shadowCODE stack and cplusplus are connected ? o.O or did you just happen to view my question on both sites.
Topic archived. No new replies allowed.