DiscussionsIssue archiveOther usage issues

Archived discussion

Accessing TColStd_HArray1OfReal values

Other usage issuesThu, 11/24/2005 - 16:003 replies

Browse this forum
QuestionAuthor

Hi,
It might be a stupid question, but how is the array of that type accessed/initialized correctly?
after
Handle(TColStd_HArray1OfReal) anArray=new TColStd_HArray1OfReal(0,5);

anArray->SetValue(3,10);
gives a segmentation fault error at the function call. Am I missing something out?

All the best and thanks in advance

D

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

->ChangeValue(3)=10; solves the issue.

thanks

02Commenter-1

HI!

Do you have any idea how to solve this error when working with Handles:

error C2661: 'new' : no overloaded function takes 3 parameters
Error executing cl.exe.

OCsdi.obj - 1 error(s), 0 warning(s)

03Commenter-2

at the beginning of your file, you should have something like :
#define new DEBUG_NEW

it is added by the VisualStudio wizard to help tracking memory leaks.

just remove the line

Commenter-2