I have studied the sections of class on the tutorial here.Now I made a program to do experiments .Can anyone please tell me what is wrong with this program?
You can't do masih.wasim(f,g); at line 32 because wasim(int, int) is a constructor of your class so it can only be called when you create an object of the class (lines 30 and 31)
You declared a class with a variable x inside of it, then when people call your "constructor" x is still undefined, you simply modify random variables for no reason. And wasim::function() simply does random arithmetic and doesn't actually do anything to the class or relate to class in anyway. It might as well be a global function.