Search found 3 matches
- Thu Nov 28, 2002 11:18 am
- Forum: C++
- Topic: How to specify a dynamic 2-dimension array
- Replies: 2
- Views: 2519
And, by the way, when I can specify the dynamic 2-dimension array, how can I call it in a function. For example, I have a 2-dimension array named S2[][], and I want to refer to it in a funtion's variable, for instance: lexico(char S2[][k], int n). Because the number k here is only known when running ...
- Thu Nov 28, 2002 9:07 am
- Forum: C++
- Topic: How to specify a dynamic 2-dimension array
- Replies: 2
- Views: 2519
How to specify a dynamic 2-dimension array
Hi friend, I know how to specify a dynamic 1-dimension array. For example,
int k = 20;
char *s=new char[k];
But I don't know that for the 2-dimension array.
Anybody knows, please help me.
Thanks
int k = 20;
char *s=new char[k];
But I don't know that for the 2-dimension array.
Anybody knows, please help me.
Thanks
- Sat Mar 23, 2002 4:34 pm
- Forum: C++
- Topic: Please help me on C++ code
- Replies: 2
- Views: 2858
Would you please help me on coding C++.
First, when I tried to write a program by C++, and submitted. What I received from the Judge is that: "wrong answer"
( I used: while(!cin.eof()) {....} to allow inputs from the judge)
However, when I just converted the program to C (by using #include <stdio.h ...
First, when I tried to write a program by C++, and submitted. What I received from the Judge is that: "wrong answer"
( I used: while(!cin.eof()) {....} to allow inputs from the judge)
However, when I just converted the program to C (by using #include <stdio.h ...