N
Nomen Nescio
hay, student proggramer 19 yrs old china in computer course
ben doing c proggraming cpl of months from pascal backgrond
enjoyying c unleashed book posible minour buggs found in
dick heathfields data structs cht
buggs not on c unleashed erata witch i looked throughly
grate book lerning lot frmo the c expertts
pg. 348
double Loading[MAX_AGE][NUM_GENDERS] = {0};
//...
void PopulateLoadingArray(double **Loading, size_t MaxAge,
size_t NumGenders)
{
size_t Age, Gender;
for(Age = 0; Age < MaxAge; Age++)
{
for(Gender = 0; Gender < NumGenders; Gender++)
{
**(Loading + Age * MaxAge + Gender) = CalcLoading(Age,
Gender);
cpl qs:
1. why this (Loading + Age * MaxAge + Gender) instead of
(Loading + Age * NumGenders + Gender)?
2. sinze Loading is (double **), does ptr arithmettic
calcullate sizeof(double) elementt or wrong sizeof(double *) elementt,
i not understend? fe. Loading + 1 - this calcullate
Loading + sizeof(double *) .. or Loading + sizeof(double)???
pg. 357
}
free;
}
??? this like return(0); can be return; or such
concet... what hapening here pls?
thx for writting book i lerning a lot much it
keep reading it lern a lot much
ben doing c proggraming cpl of months from pascal backgrond
enjoyying c unleashed book posible minour buggs found in
dick heathfields data structs cht
buggs not on c unleashed erata witch i looked throughly
grate book lerning lot frmo the c expertts
pg. 348
double Loading[MAX_AGE][NUM_GENDERS] = {0};
//...
void PopulateLoadingArray(double **Loading, size_t MaxAge,
size_t NumGenders)
{
size_t Age, Gender;
for(Age = 0; Age < MaxAge; Age++)
{
for(Gender = 0; Gender < NumGenders; Gender++)
{
**(Loading + Age * MaxAge + Gender) = CalcLoading(Age,
Gender);
cpl qs:
1. why this (Loading + Age * MaxAge + Gender) instead of
(Loading + Age * NumGenders + Gender)?
2. sinze Loading is (double **), does ptr arithmettic
calcullate sizeof(double) elementt or wrong sizeof(double *) elementt,
i not understend? fe. Loading + 1 - this calcullate
Loading + sizeof(double *) .. or Loading + sizeof(double)???
pg. 357
}
free;
}
??? this like return(0); can be return; or such
concet... what hapening here pls?
thx for writting book i lerning a lot much it
keep reading it lern a lot much