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

C / C++ / MFC

 
GeneralRe: MFC Pin
Christian Graus21-Mar-04 15:00
protectorChristian Graus21-Mar-04 15:00 
GeneralOriginal entry point Pin
Mila02520-Mar-04 23:46
Mila02520-Mar-04 23:46 
GeneralRe: Original entry point Pin
Alexander M.,21-Mar-04 8:15
Alexander M.,21-Mar-04 8:15 
QuestionCan I use SendRequest to Post HTTP form data? Pin
rasha200320-Mar-04 23:00
rasha200320-Mar-04 23:00 
AnswerRe: Can I use SendRequest to Post HTTP form data? Pin
Prakash Nadar20-Mar-04 23:40
Prakash Nadar20-Mar-04 23:40 
GeneralRe: Can I use SendRequest to Post HTTP form data? Pin
rasha200321-Mar-04 1:57
rasha200321-Mar-04 1:57 
GeneralRe: Can I use SendRequest to Post HTTP form data? Pin
Prakash Nadar21-Mar-04 3:16
Prakash Nadar21-Mar-04 3:16 
GeneralLooking for a safe and efficient way to use two dimensional arrays. Pin
George220-Mar-04 20:24
George220-Mar-04 20:24 
Hello, everyone!


I am looking for a safe and efficient way to use two dimensional arrays, better a library that I can use in C/C++.

Here is the way that I used before, allocate a pointer array, and then allocate memory pointed by each pointer in the array (size of each memory block pointed by each pointer may be vary and I always use an additional one dimensional array to record each of their size). But I find it is hard to manage (for example, release/free memory), because all the space the two dimensional array using is allocated on the heap and not on the stack, and
it is easy to result in memory leak if the management mechanism is not sound. And I want to supply an unified interface to client applications using the library, who uses the memory block as a two dimentional array, for example, A[i][j], and not using it as pointers, for example, *(A + i + j). Maybe to implement that function, I need a wrapper or a middle layer.

What I am looking for is a safe and efficient way to define, allocate space, manipulate and free (free part or all of the two dimensional array). Can anyone help? Are there some source codes or tutorials that I can make a reference?


Thanks in advance,
George
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
Andrew Walker20-Mar-04 21:55
Andrew Walker20-Mar-04 21:55 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
George220-Mar-04 22:32
George220-Mar-04 22:32 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
Branislav21-Mar-04 2:48
Branislav21-Mar-04 2:48 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
Nick Parker21-Mar-04 7:52
protectorNick Parker21-Mar-04 7:52 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
George221-Mar-04 17:15
George221-Mar-04 17:15 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
George221-Mar-04 17:20
George221-Mar-04 17:20 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
Branislav21-Mar-04 21:04
Branislav21-Mar-04 21:04 
GeneralRe: Looking for a safe and efficient way to use two dimensional arrays. Pin
George221-Mar-04 21:09
George221-Mar-04 21:09 
Questionhow does the function of the scrollbar control work? Pin
vividtang20-Mar-04 19:23
vividtang20-Mar-04 19:23 
AnswerRe: how does the function of the scrollbar control work? Pin
Branislav21-Mar-04 3:09
Branislav21-Mar-04 3:09 
GeneralSTRRET question Pin
nm_11420-Mar-04 18:01
nm_11420-Mar-04 18:01 
GeneralOrganising VC libraries dlls etc Pin
axid3j1al20-Mar-04 17:01
axid3j1al20-Mar-04 17:01 
GeneralRe: Organising VC libraries dlls etc Pin
Ravi Bhavnani21-Mar-04 3:29
professionalRavi Bhavnani21-Mar-04 3:29 
GeneralRe: Organising VC libraries dlls etc Pin
axid3j1al21-Mar-04 12:29
axid3j1al21-Mar-04 12:29 
GeneralRe: Organising VC libraries dlls etc Pin
Ravi Bhavnani21-Mar-04 14:34
professionalRavi Bhavnani21-Mar-04 14:34 
GeneralRe: Organising VC libraries dlls etc Pin
axid3j1al21-Mar-04 14:56
axid3j1al21-Mar-04 14:56 
GeneralRe: GDI object viewer add-in Pin
Antti Keskinen20-Mar-04 23:56
Antti Keskinen20-Mar-04 23:56 

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.