Click here to Skip to main content
15,907,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncomparision of string Pin
tasumisra23-Nov-08 18:36
tasumisra23-Nov-08 18:36 
AnswerRe: comparision of string Pin
_AnsHUMAN_ 23-Nov-08 18:48
_AnsHUMAN_ 23-Nov-08 18:48 
GeneralRe: comparision of string Pin
tasumisra23-Nov-08 19:09
tasumisra23-Nov-08 19:09 
GeneralRe: comparision of string Pin
_AnsHUMAN_ 23-Nov-08 19:14
_AnsHUMAN_ 23-Nov-08 19:14 
GeneralRe: comparision of string Pin
tasumisra23-Nov-08 19:19
tasumisra23-Nov-08 19:19 
GeneralRe: comparision of string Pin
_AnsHUMAN_ 23-Nov-08 19:27
_AnsHUMAN_ 23-Nov-08 19:27 
GeneralRe: comparision of string Pin
tasumisra23-Nov-08 20:06
tasumisra23-Nov-08 20:06 
QuestionHaving problem with 2-dimensional dynamic array Pin
shahb23-Nov-08 18:24
shahb23-Nov-08 18:24 
I'm currently using 2-dimensional dynamic array as a function parameter to store value of double. My problem is my program sometimes having a runtime error. I've try a m=3200 x n=58 array size, it only run for a wait before aborting the program. When I reduced the size of the array it works. Here is my declaration of the array:

double* precomp=new double[(_CANVAS_WIDTH /_TILE_WIDTH)*(_CANVAS_HEIGHT /_TILE_HEIGHT)*_TILE_COUNT];
int i,j;
   for( i = 0; i < (_CANVAS_WIDTH /_TILE_WIDTH) * (_CANVAS_HEIGHT /_TILE_HEIGHT); i++)
    for(j=0; j< _TILE_COUNT;j++)
      *(precomp + i* _TILE_COUNT+j) = 0.0;

calculate(TheList, Target, precomp);
Here is the function implementation :
void calculate(double* param1, double TargetValue, double* precomp)
{
	double _tile;

	for (unsigned int y=0; y<list_index;>	{
			for (unsigned int j=0; j<num_of_tiles;>			{
				_tile = param1[j];
				cout<<"Pre-calculating value for location"<<y<<":tile "<<j<<endl;
				*(precomp_fitness + i*num_of_tiles + j) = abs(TargetValue - _tile);
             
			}
	}

}

If anyone could help me understand what was happening, it is very appreciated. Thanks.
AnswerRe: Having problem with 2-dimensional dynamic array Pin
CPallini23-Nov-08 22:33
mveCPallini23-Nov-08 22:33 
Questionstore bitmap into harddisk Pin
220823-Nov-08 17:45
220823-Nov-08 17:45 
AnswerRe: store bitmap into harddisk Pin
Hamid_RT23-Nov-08 20:33
Hamid_RT23-Nov-08 20:33 
GeneralRe: store bitmap into harddisk Pin
220824-Nov-08 17:03
220824-Nov-08 17:03 
GeneralRe: store bitmap into harddisk Pin
Hamid_RT25-Nov-08 2:44
Hamid_RT25-Nov-08 2:44 
QuestionHelp me Pin
Tsodgorhuu23-Nov-08 17:41
Tsodgorhuu23-Nov-08 17:41 
AnswerWrong Forum Pin
_AnsHUMAN_ 23-Nov-08 18:33
_AnsHUMAN_ 23-Nov-08 18:33 
QuestionCryptAcquireContext question Pin
monsieur_jj23-Nov-08 16:51
monsieur_jj23-Nov-08 16:51 
QuestionHow to display a csv file on a click of button Pin
keerthihaasan23-Nov-08 14:26
keerthihaasan23-Nov-08 14:26 
AnswerRe: How to display a csv file on a click of button Pin
Maximilien23-Nov-08 16:25
Maximilien23-Nov-08 16:25 
AnswerRe: How to display a csv file on a click of button Pin
Chandrasekharan P23-Nov-08 17:12
Chandrasekharan P23-Nov-08 17:12 
GeneralRe: How to display a csv file on a click of button Pin
keerthihaasan23-Nov-08 18:11
keerthihaasan23-Nov-08 18:11 
GeneralRe: How to display a csv file on a click of button Pin
Chandrasekharan P23-Nov-08 18:16
Chandrasekharan P23-Nov-08 18:16 
GeneralRe: How to display a csv file on a click of button Pin
Cedric Moonen23-Nov-08 20:25
Cedric Moonen23-Nov-08 20:25 
QuestionHow does the Windows Explorer status bar know file details? Pin
Xiphias323-Nov-08 7:42
Xiphias323-Nov-08 7:42 
Questionconverting float[][] to float** in function params Pin
Chesnokov Yuriy23-Nov-08 5:04
professionalChesnokov Yuriy23-Nov-08 5:04 
QuestionRe: converting float[][] to float** in function params Pin
CPallini23-Nov-08 8:23
mveCPallini23-Nov-08 8:23 

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.