Click here to Skip to main content
15,896,154 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionReturn bidimensional array Pin
_Flaviu4-Sep-14 2:07
_Flaviu4-Sep-14 2:07 
I have a class (taken from somewhere). Here, I have a member like this:
C++
public:
	void SetBitmapDataSize(const int x, const int y);

private:
	int m_PixelNumberX;
	int m_PixelNumberY;
	vector<vector<COLORREF> > BitmapData; 

and SetBitmapDataSize is implemented:
C++
void CBitmapOp::SetBitmapDataSize(const int x, const int y)
{
	m_PixelNumberX = x;
	m_PixelNumberY = y;
	if((x>=0) && (y>=0))
	{		
		BitmapData.resize(m_PixelNumberX); 
		for(int x = 0; x < m_PixelNumberX; x++) 
			BitmapData[x].resize(m_PixelNumberY); 
	}
}


Now, I want to replace vector<vector<colorref> > with this CArray:
I had tried:
C++
private:
	int m_PixelNumberX;
	int m_PixelNumberY;
	CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > m_arrBitmapData;

my question is, how can replace vector.resize method, and how can I return CArray< CArray<COLORREF, COLORREF&>, CArray<COLORREF, COLORREF&> > data type ?

Thank you.

modified 4-Sep-14 8:17am.

QuestionRe: Return bidimensional array Pin
David Crow4-Sep-14 3:33
David Crow4-Sep-14 3:33 
AnswerRe: Return bidimensional array Pin
_Flaviu4-Sep-14 21:31
_Flaviu4-Sep-14 21:31 
GeneralRe: Return bidimensional array Pin
Freak304-Sep-14 21:36
Freak304-Sep-14 21:36 
GeneralRe: Return bidimensional array Pin
_Flaviu4-Sep-14 22:38
_Flaviu4-Sep-14 22:38 
AnswerRe: Return bidimensional array Pin
CPallini4-Sep-14 3:35
mveCPallini4-Sep-14 3:35 
AnswerRe: Return bidimensional array Pin
nv34-Sep-14 23:55
nv34-Sep-14 23:55 
GeneralRe: Return bidimensional array Pin
_Flaviu5-Sep-14 0:25
_Flaviu5-Sep-14 0:25 
GeneralRe: Return bidimensional array Pin
nv35-Sep-14 1:19
nv35-Sep-14 1:19 
GeneralRe: Return bidimensional array Pin
_Flaviu5-Sep-14 2:43
_Flaviu5-Sep-14 2:43 
GeneralRe: Return bidimensional array Pin
_Flaviu9-Sep-14 1:22
_Flaviu9-Sep-14 1:22 
GeneralRe: Return bidimensional array Pin
nv39-Sep-14 20:30
nv39-Sep-14 20:30 
QuestionWhat if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
shaktikanta3-Sep-14 22:43
shaktikanta3-Sep-14 22:43 
AnswerRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
CPallini3-Sep-14 23:09
mveCPallini3-Sep-14 23:09 
GeneralRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
shaktikanta4-Sep-14 0:34
shaktikanta4-Sep-14 0:34 
GeneralRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
CPallini4-Sep-14 1:59
mveCPallini4-Sep-14 1:59 
AnswerRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
Albert Holguin4-Sep-14 3:08
professionalAlbert Holguin4-Sep-14 3:08 
AnswerRe: What if two executable/Dynamic libraries use another common Dynamic library at the same time? Pin
Albert Holguin4-Sep-14 3:05
professionalAlbert Holguin4-Sep-14 3:05 
QuestionVS2005 Build order problem Pin
narasingubhanu3-Sep-14 21:04
narasingubhanu3-Sep-14 21:04 
AnswerRe: VS2005 Build order problem Pin
Freak304-Sep-14 0:26
Freak304-Sep-14 0:26 
AnswerRe: VS2005 Build order problem Pin
Albert Holguin4-Sep-14 3:12
professionalAlbert Holguin4-Sep-14 3:12 
Questiondeterminant of matrix in c N*N dimension return error at //answer[r][s]=input[p][q]; Pin
mybm13-Sep-14 3:17
mybm13-Sep-14 3:17 
AnswerRe: determinant of matrix in c N*N dimension return error at //answer[r][s]=input[p][q]; Pin
jeron13-Sep-14 4:39
jeron13-Sep-14 4:39 
GeneralRe: determinant of matrix in c N*N dimension return error at //answer[r][s]=input[p][q]; Pin
mybm13-Sep-14 4:47
mybm13-Sep-14 4:47 
GeneralRe: determinant of matrix in c N*N dimension return error at //answer[r][s]=input[p][q]; Pin
jeron13-Sep-14 4:53
jeron13-Sep-14 4:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.