Click here to Skip to main content
15,887,267 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC42.DLL Pin
Nelek26-Sep-07 1:32
protectorNelek26-Sep-07 1:32 
GeneralRe: MFC42.DLL Pin
rishimohan26-Sep-07 17:27
rishimohan26-Sep-07 17:27 
AnswerRe: MFC42.DLL Pin
Steven Jan25-Sep-07 22:01
Steven Jan25-Sep-07 22:01 
GeneralRe: MFC42.DLL Pin
rishimohan26-Sep-07 18:44
rishimohan26-Sep-07 18:44 
AnswerRe: MFC42.DLL Pin
David Crow26-Sep-07 3:13
David Crow26-Sep-07 3:13 
GeneralRe: MFC42.DLL Pin
rishimohan26-Sep-07 19:47
rishimohan26-Sep-07 19:47 
AnswerRe: MFC42.DLL Pin
Eytukan26-Sep-07 4:53
Eytukan26-Sep-07 4:53 
QuestionQuestions about creating a 3D array class Pin
leileicats25-Sep-07 18:07
leileicats25-Sep-07 18:07 
I am doing one project in the book "Data Structures and Algorithms with Object-Oriented Design Patterns in C++". The project is designing a 3D array class based on previous 2D array class.

Code as follows:

template <class t="">
class Array2D
{
public:
Array2D(int w, int h):width(w), height(h), array(w*h) {}
... ...
protected:
int width, height;
Array<t> array;
}

template <class t="">
class Array3D
{
public:
Array3D(int l, int w, int h):length(l), width(w), height(h), array(l) {}
... ...
protected:
int length, width, height;
Array< Array2D<t> > array;
}



I am planning to create a array with elements of 2D array. I could use the initializer "array(l)" to define the length of array. But the size of element "Array2D<t>" should be "width*height". But I don't know how to initialize the size of "Array2D<t>" in the class of Array3D.

Could anybody give me some advice please?
AnswerRe: Questions about creating a 3D array class Pin
Branislav26-Sep-07 0:29
Branislav26-Sep-07 0:29 
Questionwav file Pin
aldo hexosa25-Sep-07 18:04
professionalaldo hexosa25-Sep-07 18:04 
AnswerRe: wav file Pin
Nishad S25-Sep-07 19:43
Nishad S25-Sep-07 19:43 
AnswerRe: wav file Pin
Mark Salsbery26-Sep-07 6:17
Mark Salsbery26-Sep-07 6:17 
QuestionReplace numbers with words? Pin
MoboTech25-Sep-07 18:00
MoboTech25-Sep-07 18:00 
AnswerRe: Replace numbers with words? Pin
Nishad S25-Sep-07 19:39
Nishad S25-Sep-07 19:39 
GeneralRe: Replace numbers with words? Pin
MoboTech25-Sep-07 19:44
MoboTech25-Sep-07 19:44 
GeneralRe: Replace numbers with words? Pin
Nishad S25-Sep-07 20:03
Nishad S25-Sep-07 20:03 
AnswerRe: Replace numbers with words? Pin
p_25-Sep-07 20:18
p_25-Sep-07 20:18 
AnswerRe: Replace numbers with words? Pin
toxcct25-Sep-07 21:00
toxcct25-Sep-07 21:00 
GeneralRe: Replace numbers with words? Pin
MoboTech25-Sep-07 21:15
MoboTech25-Sep-07 21:15 
GeneralRe: Replace numbers with words? Pin
toxcct25-Sep-07 21:24
toxcct25-Sep-07 21:24 
GeneralRe: Replace numbers with words? Pin
MoboTech25-Sep-07 21:40
MoboTech25-Sep-07 21:40 
GeneralRe: Replace numbers with words? Pin
toxcct25-Sep-07 21:47
toxcct25-Sep-07 21:47 
GeneralRe: Replace numbers with words? Pin
MoboTech25-Sep-07 22:01
MoboTech25-Sep-07 22:01 
GeneralRe: Replace numbers with words? Pin
toxcct25-Sep-07 22:05
toxcct25-Sep-07 22:05 
GeneralRe: Replace numbers with words? Pin
MoboTech25-Sep-07 22:15
MoboTech25-Sep-07 22:15 

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.