I overloaded a function like the following:  void myClass::saveAsMat (bool complete){   ... }  void myClass::saveAsMat (std::string filename){   ... }   In my main.cpp when I call the function like this:  myObj.saveAsMat(true);   everthing works fine. But when I instead call the function like this:  myObj.saveAsMat("myName");   the function is not being executed at all. I expected a compile or runtime error but there is nothing like that. The program gets compiled and runs only that the function is ignored. (I checked this by placing some std::cout inside the function).  Then I found out that I can solve this by changing the argument passed to:  myObj.saveAsMat(string("myName"));   Why do I have to set the extra string() for the argument? Other functions that are not overloaded are working fine by simply passing "myName" for a "std::string" paramenter.
Having recently introduced an overload of a method the application started to fail. Finally tracking it down, the new method is being called where I did not expect it to be.  We had  setValue( const std::wstring&amp; name, const std::wstring&amp; value );  std::wstring avalue( func() ); setValue( L"string", avalue ); std::wstring bvalue( func2() ? L"true", L"false" ); setValue( L"bool", bvalue ); setValue( L"empty", L"" );   It was changed so that when a bool value is stored we use the same strings (internal data storage of strings)  setValue( const std::wstring&amp; name, const std::wstring&amp; value ); setValue( const std::wstring&amp; name, const bool&amp; value );  std::wstring avalue( func() ); setValue( L"string", avalue ); setValue( L"bool", func2() ); setValue( L"empty", L"" ); &lt;&lt; --- this FAILS!?!   The problem with L"" is that it is implicitly casting and previously it was happy to be a std::wstring, but not it prefers to be a bool. The MSVC compiler does not complain, or raise warning, so I'm worried that even if I "fix" the setValue( L"empty", L"" ); to be  setValue( L"empty", std::wstring() );   somebody else may come later and simply use setValue( L"empty", L"" ); and have to track down this issue again.  We thought to use explicit on the method but it is not a valid keyword for this usage. Is there some way to get the compiler to complain about this, or otherwise prevent the issue?  Otherwise I'm thinking to change the name of the method which takes a bool to ensure it can't make an incorrect guess.
Protagonist becomes the avatar of an alien deity and has to cope with adversary god I read this at least 20 years ago, and I believe it was originally published in the '60s.   The main character is a human, but somehow "inherits godhood" from an alien, whose species is very long lived. IIRC this is one of the old-style god thingies, i.e. "god of thunder" not "omniscient omnipotent omnipresent transcendent being".  The plot somehow revolved around identifying and fighting some enemy which, I believe, was in turn a member of the alien species who acted as the avatar of the opposite god in the alien pantheon.  The only thing I remember for sure is that the enemy was identified as "green green" or "gringrin" (sadly, I read this in translation so I am not sure what the original meant) Why Re-throw Exceptions? I've seen the following code many times:  try {     ... // some code } catch (Exception ex) {     ... // Do something     throw new CustomException(ex);      // or     // throw;      // or     // throw ex; }   Can you please explain the purpose of re-throwing an exception? Is it following a pattern/best practice in exception handling? (I've read somewhere that it's called "Caller Inform" pattern?) Is the "the ... the ..." construction governed by some grammatical rule? How do I ping a website or IP address with Python? How to check a particular directory is mounted on the Linux machine. For instance there is a folder named test, I want to check if it is mounted or not. When you send a group text message in iOS, it appears as if you automatically opt in to receive any and all replies to that message. Is there a way to avoid being included in group replies? Is there a way to remove oneself from a group chat? Should Suggested Edits change the technical content of a post? I have noticed a significant number of suggested edits that attempt to fix code, or change the original meaning of someone else's post.    Is this really a good idea?    I've been on StackOverflow awhile, and among the editors who have sufficient reputation to edit without approval, I've never seen anyone modify the technical content or meaning of someone else's post.   I would consider obvious syntax and spelling errors OK to change, but I have seen many suggested edits that change the meaning of the code that was posted, or add things to the code that have nothing to do with the original question. A good example of this would be adding parameters to a SQL command, when the question was not asking about SQL injection. How to split the terminal into more than one "view"? Theorem numbering SF novel about one-way scientific expedition to inhabited planet, where telepathic aliens "talk" sort of ++like this++ and ~*~this~*~ I'm looking for a novel I read in the mid-to-late 1990s. It was a science fiction novel about an expedition of scientists sent at sub-light-speed (maybe in cryo-sleep?) to investigate a star system. Once there they set up a permanent scientific outpost.  There was at least one inhabited planet in the system, with a sentient species that communicated telepathically. The aliens' speech was represented with various symbols instead of quotation marks, with each named character having (I think) its own characteristic set of symbols, as in the title of the question. The scientists are eventually able to communicate with these (generally friendly) aliens.  The thing I remember most clearly is the end of the book. This was a one-way trip for the scientists, so gradually they all die off from various causes. When the next-to-last member of the crew dies of old age, the survivor is looking for an epigraph for her funeral, and (ironically, considering my current plight) can't find it in his search of the electronic library. He finally discovers it under "humor" because it's by Mark Twain: "Wherever she was, there was Eden." (This quote, of course, I found immediately in  and many other sources; it's from Eve's Diary.)  Other pieces of information I'm less sure of:   I don't think the planet was hospitable to humans; it may have been something like a gas giant, with the aliens "swimming" through the gas. I think the scientists stayed in an orbital space station, though they may have made expeditions to the planet in vehicles or protective suits. There may have been a "twin" planet, or a moon in an eccentric orbit, that caused periodic "flares" of some sort on the aliens' planet. There might have been some conflict between the crew early on, maybe because there was a non-scientific (military) commander, or perhaps just because people have conflict. I think the author was of sort of middling fame; respected and known by SF enthusiasts, but not a superstar like Asimov or Clarke. Almost certainly male, and probably with a professional science background. I think the science was fairly authentic, although the first-contact bit was obviously highly speculative. When, if ever, should voting override answer acceptance for answer sorting? Making tags visible when using a Tumblr theme that doesn't show them Generalized Euler sum $\sum_{n=1}^\infty \frac{H_n}{n^q}$ Proving set of interiors is open How to add a small rounded rectangle around a word inline I want to add a box with a very light pink background and red border around a word but inline and  within a sentence.   i.e. something like this (drawn with inkscape)    I know the mdframed package can be used for placing boxes around paragraphs, but it does not seem to work inline and also give colored boxes.   Possibly TikZ is a solution? From the little I know of TikZ, it can be used to draw pictures inline inside a sentence. Here's an example question from the :     On the last day of a one-week sale, customers numbered 149 through 201 were waited on. How many customers were waited on that day?   Possible answers: 51, 52, 53, 152, 153.   The correct answer here is 53, which is the result of (201-149) + 1 = 53.  What's the reasoning in adding the +1? How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...] What does increased caster level affect? A  adds +1 caster level, what does this affect?   Damage from spells? (Like fireball) Duration and area of effect? "Amount" of effect (Like number of missiles from magic missile) Spells known by a wizard (ie +1 caster level mean a level 2 wizard gets the spells as if they were level 3?) Anything else? Discontinuous functions with closed graphs I tried looking up a question regarding graphs of continuous functions on this site, but all the ones I found consider functions from $\mathbb{R}$ into $\mathbb{R}$. I have been pondering the following question: given a general topological spaces $X, Y$, and a function $f: X\to Y$, when does $Graph(f)$ closed in $X\times Y$ imply that $f$ is continuous. By the closed graph theorem, this is true whenever $X$ and $Y$ are both Banach spaces.   Also, it is fairly easy to prove that whenever $Y$ is a Hausdorff space and $f$ is continuous, then $Graph(f)$ is closed, but I do not think that the converse is true, so I am trying to find an example where $X$ is some topological space, $Y$ a Hausdorff space, $f: X\to Y$ a function with a closed graph in $X\times Y$, but who fails to be continuous. As of yet I have not been able to find such a counterexample, partially because I have no clue where to look for such a counterexample. I would really appreciate getting some directions to go in. Is there a way in Java to determine if a path is valid without attempting to create a file?