Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory problem!

Status
Not open for further replies.

jayjay60

Programmer
Jun 19, 2001
97
FR
Hi everybody,

Perhaps a simple question but, i would like to suggest it o you:

In my application, i have an "access violation" message which appear to this following line:

*(pHistoDBNorm+ j- *(pInflex+i)- *pInflex), when i=0 and j=16, just with this indications, you will tell me to check if th e allocation is well done, but the problem is if i remove *(pInflex+i)- *pInflex (which is equal to 0), in the debug window, the following
*(pHistoDBNorm+ j) is evaluated correctly whereas
*(pHistoDBNorm+ j- *(pInflex+i)- *pInflex), always in the debug window couldn't be evaluated (instead of reading a value which would have to be the same than *(pHistoDBNorm+ j), i could read something like that:"expression couldn't be read..."

why??????

thanks in advance

jayjay
 
It seems like pInflex is not initialized. To what value is it evaluated? Can you see *pInflex?
 
sorry it's right that i haven't specified that i could see *pInflex and *(pInflex+i) when the problem arrives they are equal to 15 (both because i=0)
 
May be you forgot parentheses:
*(pHistoDBNorm + j - (*(pInflex+i) - *pInflex))

 
you're right, sorry for this stupid mistake and thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top