PDA

View Full Version : Run Time Error.



kenny_isles
6th March 2007, 07:05
Hi,

This Error Has Occured In Two Places.

I dont know why.

Some One Please Help.


int numofcols = table1->numCols();
int numofrows = table1->numRows();
int i,j;
for ( j=0; j <= numofcols; j++ )
{
for ( i=0; i<= numofrows; i++ )
{
text.append(this->table1->text(i,j));
text.append(";");
}
}

This piece of code is running inside a function which will be called by its parent function. Its just like a sub function.


Also


k=0;
for ( i=0 ; i<n ; i++)
{
if (c_str[i] == ';' )
{
a[k] = i;
k++;
}
}
This also creates the same problem.


Some One Plz Tell me as to do wat.

Regards
Kenny

sunil.thaha
6th March 2007, 09:19
You have not told us what the probelm is ... Just a wild guess


for ( j=0; j < numofcols; j++ )
{
for ( i=0; i< numofrows; i++ )
{
Should do I think