Non Standard Syntax Use &Amp; To Create A Pointer To Member, Error C3867 Assign&#39: Non

void Blending::Blend(int, void*){ alpha = (double)defaultvalue / 100; addWeighted(img, alpha, img2, 1.0 – alpha, 0, des); imshow(“Blendimage”, des);}int main(){ Blending ble; ble.Blend(defaultvalue, 0); createTrackbar(“Blend”, “Blendimage”, &defaultvalue, maximumvalue, ble.Blend); waitKey(0); return 0;} i get the non-standard error when i pass the Blend function to createTrackBar using the object of the class to call the function direct.. any help pls

You are watching: Non standard syntax use & to create a pointer to member

using the object of the class to call the function direct.

problem is: your code does NOT use the object 😉

*

sjhalayka

*

1170 ●4 ●18

See more: Send You Or Send To You Or Send You? Vs Send You It

You can make the function static, and call it accordingly:

class c{public: static void on_trackbar(int, void*) { }};// …createTrackbar(“Foo”, “Bar”, &some_variable, another_variable, c::on_trackbar); If this code does not solve your problem, then please let me know. On the other hand, if this code does solve your problem, then please upvote my answer and mark it as correct. Thank you.

header file——

class Blending{public: static void Blend(int, void*); int Blended(); //int imageinput(); double alpha, beta; int key; int defaultvalue;}; void Blending::Blend(int, void*) { Blending b; b.alpha = (double)b.defaultvalue / 100; // error uninitialized local variable “b” used addWeighted(img, b.alpha, img2, 1.0 – b.alpha, 0, des); imshow(“Blendimage”, des); }int main(){ Blending ble; ble.Blend(defaultvalue, 0); createTrackbar(“Blend”, “Blendimage”, &defaultvalue, maximumvalue, Blending::.Blend); waitKey(0); return 0;}when i build the code i get the error message “uninitialized local variable “b” used”, any help

*
*

Area of a single pixel object in brianowens.tv

build problems for android_binary_package – Eclipse Indigo, Ubuntu 12.04

brianowens.tv DescriptorMatcher matches

Can't compile .cu file when including brianowens.tv.hpp

Using brianowens.tv's stitching module, strange error when compositing images

videofacerec.py example help

compile error in brianowens.tv2/flann/lsh_table.h when compiling bgslibrary

brianowens.tv2 ios framework error

Installing Sample App / brianowens.tv Manager

Conversion between IplImage and MxArray

See more: Texas Dairy Queen Store El Paso, Tx, 404: This Page Could Not Be Found

Please note: brianowens.tv brianowens.tv requires javascript to work properly, please enable javascript in your browser, here is how

Published

Leave a comment

Your email address will not be published. Required fields are marked *