M
mkarja
Hi,
I've got problems with 2D array.
I have a program that gets results from sql server 2000 and
puts the results in an std::string.
Here's a few example lines of code to help explain my problem.
<--- myprog.h --->
#define MAXROWS 200
#define MAXCOLUMNS 100
std::string pszResultValues[MAXROWS][MAXCOLUMNS];
<--- myprog.h --->
<--- myprog.cpp --->
long row=0,column=0;
pszResultValues[row][column]=_bstr_t(pszReceivedData);
<--- myprog.cpp --->
I loop through the results and add them to pszResultValues.
It works fine MAXROWS isn't bigger than 200 and MAXCOLUMNS
isn't bigger than 100. If I put MAXCOLUMNS value past 100
it fails. Is that some sort of array restriction or what ?
Is there a way to somehow define dynamic values to
MAXROWS and MAXCOLUMNS or is there some other solution.
I would post the actual code that I use, but it uses
companys own API etc stuff so I can't post them here.
I hope you understand my dilemma from the above.
Thanks in advance for all the help.
I've got problems with 2D array.
I have a program that gets results from sql server 2000 and
puts the results in an std::string.
Here's a few example lines of code to help explain my problem.
<--- myprog.h --->
#define MAXROWS 200
#define MAXCOLUMNS 100
std::string pszResultValues[MAXROWS][MAXCOLUMNS];
<--- myprog.h --->
<--- myprog.cpp --->
long row=0,column=0;
pszResultValues[row][column]=_bstr_t(pszReceivedData);
<--- myprog.cpp --->
I loop through the results and add them to pszResultValues.
It works fine MAXROWS isn't bigger than 200 and MAXCOLUMNS
isn't bigger than 100. If I put MAXCOLUMNS value past 100
it fails. Is that some sort of array restriction or what ?
Is there a way to somehow define dynamic values to
MAXROWS and MAXCOLUMNS or is there some other solution.
I would post the actual code that I use, but it uses
companys own API etc stuff so I can't post them here.
I hope you understand my dilemma from the above.
Thanks in advance for all the help.