I am passing different types of argument to the fun(), the code gets compiled, but still, the same function that prints "Class B" is getting executed. Shouldn't there happen overloading of functions? Why does this happen?  #include &lt;iostream&gt; using namespace std;  class A {     public:     void fun(int x)     {         cout&lt;&lt;"class A"&lt;&lt;endl;     }  };  class B: public A {     public:     void fun (char c)     {         cout&lt;&lt;"Class B"&lt;&lt;endl;     } };  int main() {     B obj;     obj.fun('c');     obj.fun(3); }
I have a function with the same name, but with different signature in a base and derived classes. When I am trying to use the base class's function in another class that inherits from the derived, I receive an error. See the following code:  class A {     public:     void foo(string s){}; };  class B : public A {     public:     int foo(int i){}; };  class C : public B {     public:     void bar()     {         string s;         foo(s);     } };   I receive the following error from the gcc compiler:  In member function `void C::bar()': no matching function for call to `C::foo(std::string&amp;)' candidates are: int B::foo(int)   If I remove int foo(int i){}; from class B, or if I rename it from foo1, everything works fine.   What's the problem with this?
Why does Python pep-8 strongly recommend spaces over tabs for indentation? Clipping raster with vector boundaries using QGIS In QGIS I would like to clip a raster precipitation layer using an admin boundary layer that is vector data. However the Geoprocessing tools seem to be usable only for vector data. How can I clip this precipitation layer? Getting "Authentication is required" when trying to access the Play Store Over the past week, whenever I try  to open the Play Store/Market app on my phone, the app thinks for a while and then displays this error message:     Authentication is required. You need to sign into your Google Account.   But I am indeed signed into my Google account, as seen in other Google applications running on the phone, and as seen if I open the menu in the Market app and click the "Accounts" button.  I suspect this might be related to the fact that over the past few months I've had two different Google accounts synced to this device, and I have recently removed one of them from the phone. No other Google application has had any problems with removing one account.  Does anyone know how I can solve this issue? I can still install applications by using the market website (now "Google Play"), but this is still a big inconvenience. I also think I stopped getting updates. What does  signify when using Vim LatexSuite? I have a LaTeX editing environment that does some assistive stuff such as auto-indenting, closing parentheses, etc.  However, one of the things that it does is unknown to me, and is difficult to search for. If I type an empty set of braces, it replaces them with  {}&lt;++&gt;   If I type two empty sets, for example when I'm setting up a fraction \frac{}{} what I actually get is  \frac\left\{ } \right\}&lt;++&gt;}&lt;++&gt;   Is this a problem? What does &lt;++&gt; do?  Edit: This is using What exactly does the *frequency* of a photon mean? JavaScript private methods Beamer: Blackboard theme and overlays I am currently preparing my beamer presentation for my PhD defense.  I took the example at the url  to get a black board style presentation.  This template includes a short script which uses a random-generator to randomly scatter dust-trails on the black background to mimic chalk traces (see MWE below).  The thing is that parallel to that, I am also using overlays to uncover my slide layout by layout. The script is executed each time I am using a layout command which slows down the compilation quite substantially. I am not so familiar with control statements in latex, so here is my question:  How can-I modify this script for the background to be refreshed only when the slide is over, and not after each layout command?  Remarks:  1) I am using the Augie font, but I didn't included it in the MWE so that it can be compiled more easily  2) In case, it should make a difference I am also using the \begin{textblock*} \end{textblock*} environment from the textpos package to position text on the slide.  Here is my MWE:   \documentclass[10pt,mathserif]{beamer}  \usepackage[francais,english]{babel} \usepackage[utf8] {inputenc} %for ISOlatin1 (8859-1) sources \usepackage[T1] {fontenc}      %for polices DC 8bits   %%%Fancy fonts %\usepackage{emerald} %\usepackage{eulervm} %%%  %%Extra packages \usepackage{amsmath} \usepackage{amsfonts} \usepackage{tikz} \usetikzlibrary{arrows,shapes} \usepackage[absolute,overlay]{textpos}    %set text colors for different objects \setbeamercolor{frametitle}{fg=white} \setbeamercolor{structure}{fg=white} \setbeamercolor{normal text}{fg=white} \setbeamercolor{alerted text}{fg=white} \setbeamercolor{example text}{fg=white}   %%Black background \setbeamercolor{background canvas}{bg=black}    %%%%%%%%%%%%%%%%%%%%%% %%%%%Script: Random Dust Trails%%%%%%%%%%%%%%% \pgfmathsetseed{\number\pdfrandomseed} % seed for random generator \setbeamertemplate{background}{     \begin{tikzpicture}         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight);        \foreach \i in {1,...,30} {             \pgfmathsetmacro{\x}{random(0,10000)/5000-1}%             \pgfmathsetmacro{\y}{random(0,10000)/10000-0.1}%             \pgfmathsetmacro{\r}{random(0,10000)/1000-5}%             \rotatebox{\r}{                 \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight}, left, base]{\includegraphics[width=\textwidth]{paintstroke.png}}             }         };      \end{tikzpicture} } %%%%%%%%%%%%%%%%%%%%%%  %%No navigation bar \setbeamertemplate{navigation symbols}{}  \begin{document}      \begin{frame}          \begin{itemize}             \item&lt;1-&gt; bla slide 1             \item&lt;2-&gt; blu slide 1             \item&lt;3-&gt; blub slide 1         \end{itemize}      \end{frame}  %%I want the background to be refreshed with the Dust Trails script only at the end of the frame          \begin{frame}          \begin{itemize}             \item&lt;1-&gt; bla slide 2             \item&lt;2-&gt; blu slide 2             \item&lt;3-&gt; blub slide 2         \end{itemize}      \end{frame}  \end{document}   This is my first post, so please be kind if I did something illegal on the formatting of the message ;-).  Thanks in advance,  Yannick I wanted to create a WP plugin. So I requested and my request was approved by WordPress.org But I don't want to develop that plugin anymore. How can I delete the repository forever or request its deletion. Is it possible to sneak up on a Force user? In Return of the Jedi, Luke and Darth Vader both sense each other's presence on the moon. In The Force Awakens, Kylo Ren   senses Han Solo on the Starkiller Base  Is it possible to sneak up on a powerful Force user? Or do you have to be   related to them  or significant to them in some way to be detected? Are there any examples of a Force user not sensing someone (in canon), or any successful attempt at disguising someone from a Force user? To clarify, I am talking about physical presence, not Force ability.   Han Solo doesn't have the Force, but Kylo sensed him anyways Update: Failed to lock /var/cache/apt/archives/lock Preventing LibreOffice from using smart quotes (“ ”) instead of (dumb) straight quotes? I use LibreOffice Calc to make lists of programs with different parameters to run on an hpc cluster. For each batch of commands I must do a find and replace on the smart quotes, as they cause errors in command line arguments. It would be nice to cut this step out of my work flow. Does anyone know how I might change the default punctuation used?  Edit: Apparently the title font transforms dumb quotes into smart quotes.  Smart quotes have a different symbol depending on if they are at the start or end (“ ”)  Dumb quotes use the same symbol for the start and the stop ( " ) I would like to travel in the USA for a period of 3 - 6 months. But I want to spend some time working for my employer (remote work) and getting paid by the employer. Is this possible under a tourist visa (B1/B2)?  I hope this is OK since I will not be getting paid by a US employer. I am in the IT trade so all that I will be needing is my own laptop and a connection to the internet. The money I earn would actually help me pay for the expenses I get during the holiday. C# difference between == and Equals() Induction proof: n lines in a plane Assume that there are $n$ infinitely long straight lines lying on a plane in such a way that no two lines are parallel, and no three lines intersect at a single point. Prove that these lines divide the plane into $\frac{n^2+n+2}{2}$ regions. (Hint: Any two non-parallel straight lines on a plane must intersect at exactly one point.)  Can someone tell me where to start here? I know to prove the base where $n=0$, but don't know how to proceed.  Any help is greatly appreciated! How can I get Gnome3 to remember my session? I am running Gnome3, but I had the same problem with Unity, on Ubuntu 12.04.  I have a fairly elaborate setup I enjoy using day-to-day. A LibreOffice spreadsheet with everyone's extension numbers; a window with reference data I use regularly; two mulit-tabbed Konsole/Terminal windows with several remote systems sessions, firefox with a set of open tabs, and so on. But whenever I log out, when I return, I must set up everything from scratch. I remember the good 'ol days, when I rebooted, I'd re-log in, and all my windows came back up in the same places as they were when I logged out, and my Konsole/Term would come up with the same remote logins as before.... I'd have to re -setup  some of my programs, but that's better than having to move every win into place, and resize them, etc.  How do I get this functionality back? Sometimes it's hard to search for older versions of macOS &amp; OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac? What is the technical term for when people thinks the actions of the few represent the many.  Like when people thinks everyone in a specific group behaves a certain way cause of how a few people in the group behave, including non stereotypical behaviours. I thought it was "generalisation" but I couldn't find any articles using that term. When can you call yourself doctor? How to peel hard boiled eggs easily? This is one of the most annoying duties in the kitchen, for me.  What are yours tips and tricks to peel hard boiled eggs easily? How to avoid nested With[]?