C++ - pointer value -


in learning opencv book:

. . cvcapture *capture = cvcreatefilecapture(argv[1]); iplimage* frame; while(1) { frame = cvqueryframe(capture); . . } 

here, can see *frame pointer. but, when write following frame = cvqueryframe(capture);, not assigning address pointer. values frame hold in case?

thanks.

frame pointer object of type iplimage. presumably, cvqueryframe() function allocates iplimage object , returns address of object. statement

frame = cvqueryframe(capture); 

assigns value of returned pointer frame. if indeed function allocating new object you'll required free memory later calling operator delete or function

void cvdestroyframe( iplimage * ); 

also statement make @ end of question ("*frame pointer") not accurate - frame pointer; *frame means you're de-referencing pointer makes type iplimage.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -