Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Spin control , it's possible to know when the control is released? Pin
timbk30-Nov-10 12:04
timbk30-Nov-10 12:04 
AnswerSolved: Spin control , it's possible to know when the control is released? Pin
timbk30-Nov-10 15:16
timbk30-Nov-10 15:16 
GeneralRe: Solved: Spin control , it's possible to know when the control is released? Pin
Code-o-mat30-Nov-10 21:46
Code-o-mat30-Nov-10 21:46 
GeneralRe: Solved: Spin control , it's possible to know when the control is released? Pin
Code-o-mat30-Nov-10 21:46
Code-o-mat30-Nov-10 21:46 
QuestionNew'ing a pointer to an array [Solved] Pin
Skippums29-Nov-10 7:36
Skippums29-Nov-10 7:36 
AnswerRe: New'ing a pointer to an array Pin
«_Superman_»29-Nov-10 7:53
professional«_Superman_»29-Nov-10 7:53 
GeneralRe: New'ing a pointer to an array Pin
Skippums29-Nov-10 8:02
Skippums29-Nov-10 8:02 
GeneralRe: New'ing a pointer to an array [modified] Pin
«_Superman_»29-Nov-10 8:34
professional«_Superman_»29-Nov-10 8:34 
Here is how it can be done, but its real ugly -
#define FIXED_SIZE 16

void allocate(long (**ptr)[FIXED_SIZE])
{
    *ptr = new long[10][FIXED_SIZE];
}

int _tmain(int argc, _TCHAR* argv[])
{
    long (*ptr)[FIXED_SIZE];

    allocate(&ptr);

    delete [] ptr;

    return 0;
}

The clean and recommended way is to use a standard container - std::vector<std::vector<long>> longArr;
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++)

Polymorphism in C
modified on Monday, November 29, 2010 2:46 PM

GeneralRe: New'ing a pointer to an array Pin
Skippums29-Nov-10 9:18
Skippums29-Nov-10 9:18 
GeneralRe: New'ing a pointer to an array Pin
«_Superman_»29-Nov-10 9:20
professional«_Superman_»29-Nov-10 9:20 
GeneralRe: New'ing a pointer to an array Pin
Skippums29-Nov-10 9:34
Skippums29-Nov-10 9:34 
GeneralRe: New'ing a pointer to an array Pin
«_Superman_»29-Nov-10 9:36
professional«_Superman_»29-Nov-10 9:36 
QuestionRestrict SDI to Resize Pin
john563229-Nov-10 3:37
john563229-Nov-10 3:37 
AnswerRe: Restrict SDI to Resize Pin
Cedric Moonen29-Nov-10 4:14
Cedric Moonen29-Nov-10 4:14 
GeneralRe: Restrict SDI to Resize Pin
john563229-Nov-10 4:36
john563229-Nov-10 4:36 
GeneralRe: Restrict SDI to Resize Pin
User 74293381-Dec-10 1:07
professionalUser 74293381-Dec-10 1:07 
Question/MT Problem. Pin
gothic_coder29-Nov-10 2:37
gothic_coder29-Nov-10 2:37 
Questionerror PRJ0003 : Error spawning 'cmd.exe' Pin
msr_codeproject29-Nov-10 2:37
msr_codeproject29-Nov-10 2:37 
AnswerRe: error PRJ0003 : Error spawning 'cmd.exe' Pin
gothic_coder29-Nov-10 2:39
gothic_coder29-Nov-10 2:39 
QuestionHow can convert a char array to CString? Pin
Le@rner29-Nov-10 1:36
Le@rner29-Nov-10 1:36 
AnswerRe: How can convert a char array to CString? Pin
Cool_Dev29-Nov-10 1:49
Cool_Dev29-Nov-10 1:49 
AnswerRe: How can convert a char array to CString? Pin
KingsGambit29-Nov-10 2:43
KingsGambit29-Nov-10 2:43 
AnswerRe: How can convert a char array to CString? Pin
CPallini29-Nov-10 3:08
mveCPallini29-Nov-10 3:08 
AnswerRe: How can convert a char array to CString? Pin
«_Superman_»29-Nov-10 7:28
professional«_Superman_»29-Nov-10 7:28 
Questionbold a substring Pin
john563229-Nov-10 1:35
john563229-Nov-10 1:35 

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.