190683/how-do-i-declare-a-2d-array-in-c-using-new
How do I declare a two-dimensional array using new?
For example, for a "typical" array, I would:
int* ary = new int[Size]
but
int** ary = new int[sizeY][sizeX]
a) doesn't work/compile and b) doesn't accomplish what:
int ary[sizeY][sizeX]
does
The algorithm header has a method std::reverse for this purpose. #include <vector> #include <algorithm> int main() { std::vector<int> ...READ MORE
I am trying to iterate over all ...READ MORE
In C++, there are two standard methods for storing strings. In this scenario, you specify an array of characters, and 0 signifies the end of the string. #include <cstring> char str[500] = "Hello"; // How ever ...READ MORE
I want to open a file in ...READ MORE
We receive std::begin and std::end in C++0x/11, which are overloaded for arrays: #include <algorithm> int main(){ int v[2000]; ...READ MORE
What's the point of sorting your array? ...READ MORE
There are three ways to pass a ...READ MORE
Since the 'second dimension' could be just ...READ MORE
How do I determine the size of ...READ MORE
Is it possible to create a two-dimensional ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.