Click here to Skip to main content
15,911,707 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDoubt in ATL Pin
Hungry Developer30-Jan-08 17:42
Hungry Developer30-Jan-08 17:42 
Questionwhy setw and setprecision can't work correctly? Pin
gentleguy30-Jan-08 17:18
gentleguy30-Jan-08 17:18 
AnswerRe: why setw and setprecision can't work correctly? Pin
Maxwell Chen30-Jan-08 17:36
Maxwell Chen30-Jan-08 17:36 
GeneralRe: why setw and setprecision can't work correctly? Pin
gentleguy30-Jan-08 17:42
gentleguy30-Jan-08 17:42 
GeneralRe: why setw and setprecision can't work correctly? Pin
Maxwell Chen30-Jan-08 18:04
Maxwell Chen30-Jan-08 18:04 
GeneralRe: why setw and setprecision can't work correctly? Pin
gentleguy30-Jan-08 19:25
gentleguy30-Jan-08 19:25 
Generaldemote system performance. Pin
vichsu30-Jan-08 16:45
vichsu30-Jan-08 16:45 
Questionhow to create a dynamic array? Pin
gentleguy30-Jan-08 13:50
gentleguy30-Jan-08 13:50 
dear all

how to create a dinamic array in c++? anyone has example code?

for example: a =10,b=3,c=4;

and then double aa[a][b][c]= (double)rand()/RAND_MAX;

thanks

#define number 10
#define row 3
#define column 4


void printarray (double arg[], const int number,const int row,const int column)
{
for (int n=0; n<number; n++)<br="" mode="hold"> for (int i=0;i<row;i++)>
for (int j=0;j<column;j++)> arg[number][row][column] = (double)rand()/RAND_MAX;

cout << arg[n][i][j] << " ";
cout << "\n";
}
int main ()
{
double firstarray[number][row][column];

printarray (firstarray,number,row,column);

return 0;
}


any problem for this code? but after debugged..problem...

error C2143: syntax error : missing ')' before 'constant'

Li Zhiyuan

5/10/2006

AnswerRe: how to create a dynamic array? Pin
Hamid_RT30-Jan-08 19:45
Hamid_RT30-Jan-08 19:45 
GeneralRe: how to create a dynamic array? Pin
gentleguy30-Jan-08 22:08
gentleguy30-Jan-08 22:08 
GeneralRe: how to create a dynamic array? Pin
Hamid_RT30-Jan-08 22:24
Hamid_RT30-Jan-08 22:24 
GeneralRe: how to create a dynamic array? Pin
gentleguy30-Jan-08 22:52
gentleguy30-Jan-08 22:52 
GeneralRe: how to create a dynamic array? Pin
Hamid_RT31-Jan-08 6:29
Hamid_RT31-Jan-08 6:29 
GeneralProblem registring Microsoft Text Service Pin
tal111130-Jan-08 12:00
tal111130-Jan-08 12:00 
GeneralRe: Problem registring Microsoft Text Service Pin
Mark Salsbery30-Jan-08 12:49
Mark Salsbery30-Jan-08 12:49 
GeneralCPropertysheet and tab ctrol Pin
misha_grewal30-Jan-08 7:48
misha_grewal30-Jan-08 7:48 
GeneralRe: CPropertysheet and tab ctrol Pin
Mark Salsbery30-Jan-08 11:34
Mark Salsbery30-Jan-08 11:34 
GeneralError in calling StackWalk64 [modified] Pin
manustone30-Jan-08 7:12
manustone30-Jan-08 7:12 
GeneralRe: Error in calling StackWalk64 Pin
Cedric Moonen30-Jan-08 7:35
Cedric Moonen30-Jan-08 7:35 
QuestionRe: Error in calling StackWalk64 Pin
CPallini30-Jan-08 9:42
mveCPallini30-Jan-08 9:42 
GeneralHide and Show Dialog... Pin
Manjunath S30-Jan-08 6:37
Manjunath S30-Jan-08 6:37 
GeneralRe: Hide and Show Dialog... Pin
Rajesh R Subramanian30-Jan-08 6:46
professionalRajesh R Subramanian30-Jan-08 6:46 
GeneralRe: Hide and Show Dialog... Pin
Manjunath S30-Jan-08 6:49
Manjunath S30-Jan-08 6:49 
QuestionRe: Hide and Show Dialog... Pin
Rajesh R Subramanian30-Jan-08 6:56
professionalRajesh R Subramanian30-Jan-08 6:56 
GeneralRe: Hide and Show Dialog... Pin
Maximilien30-Jan-08 7:47
Maximilien30-Jan-08 7:47 

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.