Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Can I make an array of shapes? If yes, how?
Print
Pages: [
1
]
Author
Topic: Can I make an array of shapes? If yes, how? (Read 1837 times)
0 Members and 1 Guest are viewing this topic.
wsh
Newbie
Posts: 1
Can I make an array of shapes? If yes, how?
«
on:
March 24, 2022, 12:23:33 pm »
I am a noob in SFML and C++ in general.
I want to create an array of circles with the same shape, but I want the number of circles to be dynamic. Is this possible? Please help.
Thank you.
Logged
Stauricus
Sr. Member
Posts: 369
Re: Can I make an array of shapes? If yes, how?
«
Reply #1 on:
March 25, 2022, 01:47:23 am »
arrays can't be dynamic in size. you probably want a std::vector for that.
you can use like
std
::
vector
<
sf
::
CircleShape
>
my_circles
;
Logged
Visit my game site (and hopefully help funding it?
)
Website
|
IndieDB
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Can I make an array of shapes? If yes, how?