All Questions
Tagged with array object-oriented
6 questions
1
vote
1
answer
640
views
PHP: simple class for storing read-only data structure, array alternative
I need to share some associative data between different parts of my application with two requirements:
immutability (so read-only)
safety against mispelling or unavailable index inside the data
mixed ...
0
votes
1
answer
698
views
Is there anyway I can store the static std::vectors of pointers of all my derived classes in my base class?
I currently have a program that has multiple derived classes. All instances of a derived class are stored inside of that class's static vector of pointers. I also have a static vector of pointers ...
2
votes
1
answer
1k
views
Beginners C# question about Array.Reverse
I am sitting through a very well-explained and thorough video tutorial series, using Visual Studio 2012 as my developing environment.
Anyway, one thing that is hard to figure out is this. Say you ...
1
vote
1
answer
1k
views
Sort rectangles in a grid based on a comparison of the center point of each
If I have a grid of rectangles and I move one of the rectangles, say above and to the left of another rectangle, how would I resort the rectangles?
Note the rectangles are in an array, so each ...
5
votes
3
answers
4k
views
Specific reasons to create own array class over using std::array?
What specific conditions or requirements should you create your own array over using std::array?
Here is my background:
I'm developing a small simple library that a small group of people will use ...
3
votes
2
answers
893
views
Should the 12-String be in its own class and why?
This question is regarding a homework project in my first Java programming class (online program).
The assignment is to create a "stringed instrument" class using (among other things) an array of ...