The aim is to add a new line to the array on each iteration of the loop.
The loop is "implied" by "void CMyAppViw::OnLButtonDown(...)"
I've tried to make it in a number of ways but filed. Here is the recent one:
Expand|Select|Wrap|Line Numbers
- int n=1;
- int array[1][2][3];
- void CMyAppView::OnLButtonDown(UINT nFlags, CPoint point)
- {
- if (n==1)
- {
- calculations(array[],n);
- }
- if (n==2)
- {
- int temp_array[1][2][3]=array[1][2][3];
- //somehow destroy array
- int array [2][2][3];
- //call a function to copy temp[1][2][3] values to array [2][2][3]
- calculations(array[],n);
- }
- n++
- }
Eventually here are the questions:
1. how to initialize a global variable in if-loop?
2. how to destroy a variable?