A have a lot of B classes, a class A has one object b. This object b has a function (calc) that needs a pointer to a method in an object of A. This method (fun) acess private variables in class (in my example just return 3).  class A;  class B { public:   virtual int calc ( int (A::*fun)())  {    return 2*fun();  }; };  class A {   B* b;  public:   A (B* b_) : b (b_) {};   int fun() { return 3; };   int run(){ return b-&gt;calc(&amp;A::fun); }; };  int main() {   B* b = new B();   A a(b);   a.run();   return 0; }   How can I use a pointer to a method correctly in definition of calc method in class B?  I am getting this error message:  teste.cpp:10:58: error: must use ‘.*’ or ‘-&gt;*’ to call pointer-to-member     function in ‘fun (...)’, e.g. ‘(... -&gt;* fun) (...)’    virtual int calc ( int (A::*fun)())  {    return 2*fun();  };                                                       ^
I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?
Why can Naruto still use Rasenshuriken? Why do electrons move towards anode in the Photoelectric effect experiment? Consider a Photoelectric effect experiment apparatus as shown in Figure 11.1    The variation of photocurrent with the voltage applied across $\mathrm{A}$ and $\mathrm{C}$ is as shown in Figure 11.3.    My question –     Why is the current non-zero even if the voltage is zero?    Consider a situation in which the voltage across the plates is zero. Photons of sufficient frequency strike the outermost surface of the cathode, emitter plate $\mathrm{C}$. Electrons become free from the attraction of nucleus as their net energy becomes positive.  Why I think that there should be no net current?  As soon as photons strike the outermost surface of the cathode(assumed to be $1$ to $10$ atomic diameters thick), electrons become free. Now, as the electrons have kinetic energy, they'll come out of that outermost surface. Now, the electrons(with kinetic energy) should have an equal probability of going in every direction of the surface. So, around half of the electrons should go in the right direction towards the anode and strike it and half should go to the left, trying to penetrate the inner surfaces of the cathode plate.   Now, the electrons which will go to the right will face some field due to the space charge present in the tube but nevertheless, some electrons will definitely reach the anode plate. After they strike with the anode plate, they'll face some resistance but still, some electrons will reach the low resistance copper wires connected to the anode plate and milliammeter.  Now, consider the electrons which go towards left. They'll definitely face resistance from cathode plate but some will still reach the copper wire.  Now, as there is no potential difference applied between $\mathrm{A}$ and $\mathrm{C}$, there is no need of commutator and voltmeter. So, the ammeter is connected in series with the anode plates and cathode plates with copper wires.  Now, if there is steady state current in the circuit, electrons emitted to any one of the sides should dominate over the other. But the number of electrons emitted on both the sides is same, and all the electrons should face the same resistance as the current(electrons) should flow in a closed loop. But if the number and velocity of electrons coming from both the sides are same, there should be no net current. But there is. Why?  Edit –  From the answers of anna v and mmainville, it can be seen that the emission of electrons is dependent on the angle of emission of light.  But still, the question remains. If the electrons emitted towards anode have enough energy to complete the circuit and again reach the holes in cathode despite the resistance in between, the electrons emitted to the left should have enough energy to come to anode plate via copper wires and again get ejected through anode plate by the virtue of their kinetic energy and reach the cathode plate. In this case too, the current should be zero which is not true. Why? Consider the following two versions of a question:1   Version 1: What is the difference in meaning between "[to be] not invited" and similar negation forms?  Version 2: What is the difference in meaning among "[to be] not invited" and similar negated forms?    Personally, I think Version 1 might subtly suggest a Star Topology (see below) with the target sentence "[to be] not invited"at the center.  And Version 2 might subtly suggest a more free-form comparison like the Mesh or Fully Connected, with the target sentence simply "one among many":   Between approx equal "Star" and among approx equal "Fully Connected"?  Don't get me wrong: I do think this is quite subtle, not always applicable, and I don't think anyone would intuit such a "network topology" meaning without further explanation.   So the main question is, are both grammatically correct?  If yes, is there a semantic difference to choose one over another, perhaps as I suggested?  Or does the plurality aspect of between and among trump other semantic and stylistic issues?    1. In my question , another user provided a very helpful edit. However, the change of the word between to among prompted this question. Need help with proof for Dedekind cuts on $\mathbb{Q}^+$ I am working on a proof about Dedekind cuts on the positive rational numbers. I have been stuck for a while on the following point and would appreciate any help.  Given $x\in \mathbb{Q}^+$ such that $x^2&lt;2$, how to find $y\in \mathbb{Q}^+$ such $y&gt;x$ and $y^2&lt;2$? Accidentally created directory named "~" (tilde) I managed to make a directory literally named ~.  (Apparently, Python's os.mkdir('~/something') does this.)  How do I remove it without nuking my home?  Also, if it helps, I have my real /home on a separate partition. And the duplicate ~ is located in (the real ) ~. Problems with pie charts There seems to be in increasing discussion about pie charts.   The main arguments against it seem to be:   Area is perceived with less power than length. Pie charts have very low data-point-to-pixel ratio   However, I think they can be somehow useful when portraying proportions. I agree to use a table in most cases but when you are writing a business report and you've just included hundreds of tables why not having a pie chart?  I'm curious about what the community thinks about this topic. Further references are welcome.  I include a couple of links:         In order to conclude this question I decided to build an example of pie-chart vs waffle-chart. Test whether a glob has any matches in bash Where is my Minecraft folder on Windows? I don't have a minecraft folder. I've looked through forums and videos, followed all the steps. I just don't have one. I have windows 7, and I have "view hidden files" turned on. I have look in the roaming folder of my app data folder, with hidden files turned on. I want to find my folder so I can install a mod, could someone please tell me why my folder isn't showing up? Boot stuck at logo screen after upgrading to 14.10 How can I get to Iceland on a cargo ship? Planning a low budget and environment friendly trip to Iceland from Helsinki, Finland next summer for me and my friend. Haven't been able to find relevant information on possibility for cargo travel (from where - eg. Norway, Denmark? - timetables, prices etc). Expected departure from Helsinki around June 18th, return at latest on July 7th 2015. I'm very thankful for any related advice (and first time on stackexchange, so apologies if I didn't formulate my question in a best possible way) I have an array of integers, how do I use each one in a mysql query (in php)? What requests do browsers' "F5" and "Ctrl + F5" refreshes generate? Is there a standard for what actions F5 and Ctrl + F5 trigger in web browsers?  I once did experiment in IE6 and Firefox 2.x. The F5  refresh would trigger a HTTP request sent to the server with an If-Modified-Since header, while Ctrl + F5 would not have such a header. In my understanding, F5  will try to utilize cached content as much as possible, while Ctrl + F5  is intended to abandon all cached content and just retrieve all content from the servers again.   But today, I noticed that in some of the latest browsers (Chrome, IE8) it doesn't work in this way anymore. Both F5 and Ctrl + F5 send the If-Modified-Since header.   So how is this supposed to work, or (if there is no standard) how do the major browsers differ in how they implement these refresh features? Prove that $z^2 \equiv ab\pmod p$ is solvable if and only if both or neither of $x^2 \equiv a \pmod p$, $x^2 \equiv b \pmod p$ are solvable. Suppose the $p$ is an odd prime not dividing $ab$.  Prove that $z^2 \equiv ab \pmod p$ is solvable if and only if both or neither of $x^2\equiv a\pmod{p}$ and $x^2 \equiv b \pmod p$ are solvable. I have an internal microphone in my laptop. I think it uses Intel High Definition Audio. But I can't get it to work with Ubuntu. It doesn't work with either the Sound Recorder or Skype.  On the Input tab in 'Sound Preferences', I just see Internal Analog Input Device... Is there a one-liner that allows me to create a directory and move into it at the same time? I find myself repeating a lot of:  mkdir longtitleproject cd longtitleproject   Is there a way of doing it in one line without repeating the directory name? I'm on bash here. Prove by induction that $n! > 2^n$ Suppose that when $n=k$  $(k\geq4)$, we have that $k!&gt;2^k$.  Now, we have to prove that $(k+1)!\geq2^{k+1}$ when $n=(k+1)$ $(k\geq4)$.  $$(k+1)! = (k+1)k! &gt; (k+1)2^k  \text{ (since }k!&gt;2^k)$$  That implies $(k+1)!&gt;2^k2$, since $(k+1)&gt;2$ because of $k$ is greater than or equal to 4.  Therefore $(k+1)!&gt;2^{k+1}$  Finally  we may conclude that $n!&gt;2^n$ for all integers $n\geq4$    Solved, thank you! During my studying to integration I find this integration.  So I tried to prove but I got stuk.  So I need help in this integration.  $$\displaystyle\int_{-\infty}^{\infty} \frac{x \sin (x)}{1+x^2}  dx = \frac {\pi}{e} $$ Backup to Azure Storage Container: Shared Access Signature the only way? RESTORE FILELISTONLY FROM URL = '' WITH CREDENTIAL = '' fails in SQL Server 2016.  Copied script from SQL Server 2012 environment, successfully restoring from Azure Storage Container, with create credential statement, and it failed in 2016.  Error message "Forbidden".  Only after logging into the Azure Portal, creating a Shared Access Signature for the container, could I execute the restore, and only by not specifying the credential did the restore work.  No documentation advises that a SAS (Shared Access Signature) is required in SQL Server 2016 for Azure container backup / restore.  Is there another way to use T-SQL to access blob backups on Azure storage containers in SQL Server 2016, than using SAS?    Looking at the MSDN tutorial on how to configure the backup service SQL 2016 introduces, a SAS is used. Refer What is the best way to explain how to choose between "its" and "it's"? I'd like to play Dragon Age Inquision in english instead of the language of my operating system, but it seems to default to that and I can't find a way to change it. I already tried setting the Origin client language to english, but that didn't change anything.  Where can I change the language for Dragon Age: Inquisition?