If you can do everything with the second option that you want to do, then it's a better option. You should avoid dynamic memory allocation unless it's necessary. There are some reasons to go with the first option. The obvious one is that you might have a variable size, but you've indicated that that isn't the case. Here are some other reasons:
- You might want to reassign
a
andb
, which can be done with pointers but not arrays. - You might want to be able to efficiently move an
A
object.