I am trying to understand what is a constructor and could you tell me why I am still able to run the program without error?  As you can see I am not doing it correctly but it still works!! why?? and when I tried to put LL=(object name ) after my class DELL it is not working? but when I retrieved the LL it works why??? If I am not clear do not hesitate to tell me and I am sorry in advance for this mess  #include &lt;iostream&gt; #include &lt;string&gt; using namespace std;   class DELL{ public:     DELL(){         cout &lt;&lt;" bla bl bla\n";     }     void setname(string x){         name = x; }          string getname()         {             return name;} private: string name;   };  int main(){      DELL (); // Variant 1     DELL LL(); // Variant 2     return 0;  }
Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?
In Quantum Mechanics we usually consider operator-valued functions: these are functions that take in real numbers and gives back operators on the Hilbert space of the quantum system.  There are several examples of these. One of them is when we work with the Heisenberg picture, where we need to consider functions $\alpha : \mathbb{R}\to \mathcal{L}(\mathcal{H})$ such that $\alpha(t)$ is the operator at time $t$.  Another example is when we deal with exponentiation of operators, like when building the time evolution operator:  $$U(t,t_0)=\exp\left(-i\frac{H}{\hbar}(t-t_0)\right),$$  Here, the $\exp$ is usually understood as being defined via the eigenvalues of $H$.  The point is, the idea of a function $\alpha : \mathbb{R}\to \mathcal{L}(\mathcal{H})$ appears quite often in Quantum Mechanics, and sometimes one needs to differentiate these. In practice we do it formally, using all the properties we would expect, but I'm curious about how one would properly define this.  If we were dealing with bounded operators, then we could use the operator norm, which is available for this kind of operator, and define the derivative as we can usually we do when there's some norm around.  The point is that in Quantum Mechanics most of the time operators are unbounded.  So in the general case, how can one define the derivative of one operator-valued function? What is the origin of "that's using your noggin"? Conditions for vertical circular motion If a bob attached to a string is swinging in vertical circular motion, we say that the bob leaves the circular path when the tension in the string becomes zero, but even when tension becomes zero, there's always a component of the bob's weight towards the center of the circle. Why then does the bob leave the circular trajectory? Difference between correlation and covariance: is covariance only useful if the relation is linear? I'm trying to understand better the difference between  covariance and correlation, besides the fact that the correlation coefficient is a dimensional and has values between $-1$ and $1$.   One unclear point is the following: the correlation coefficient can highlight only a linear relation between two variables, but does  covariance only work for linear relations too? Supposing that the relation is not linear, is the covariance not zero? Is it bigger than in the case in which the relation is linear?   Cauchy inequality says $$|\sigma_{xy}|&lt;\sigma_{x} \sigma_{y}$$  Which seems to say that the covariance is maximum when there is a perfect linear relation.    So I do not get what does happen if the relation is not linear, and, if covariance is not a suitable parameter in that cas I don't get the reason for that, since simply looking at the definition:  $$\sigma_{xy}=\frac{\sum(x-\bar{x})(y-\bar{y})}{N}$$  it looks like that this should be non zero for any kind of relation (like parabolic).  So can this be a difference between the use of covariance and correlation coefficient? (The first is useful for any kind of relation, the second one only for linear ones). Assuming file2 already exists, the command   &gt; file1 &lt; file2 cat   appears to be copying the content of file2 to file1.  But I cannot understand this structure.  I understand that "Nothing" is being directed to file1 (creating or erasing its content). Then the content of file2 is being directed to file1.  Why is cat after file2? How does it know to cat file2 if the operands are not in the correct order? How to typeset asymmetrical confidence level limits / uncertainties? Black holes and positive/negative-energy particles I encountered a problem today to prove that $(X_n)$ with $X_n = \cos(n!)$ does not have a limit (when $n$ approaches infinity). I have no idea how to do it formally. Could someone help? The simpler the proof (by that I mean less complex theorems are used) the better. Thanks Is $\frac{\textrm{d}y}{\textrm{d}x}$ not a ratio? In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe? On all of the other SOFU sites a downvote means The question is unclear or not useful.  However, here on meta, a downvote has become a sign of I don't agree with the question, suggestion, feature request, bug, etc. being described in the question.   What does a downvote on Meta really mean? What other reasons do people downvote on Meta? Why is it okay for meta to redefine the meaning of the downvote?  The tooltips and instructions are all the same here on meta.   Note: I'm not saying I disagree with the practice, just curious. Is "has or will read" grammatical? I just wrote  in an ELL chat room. But looking at it (or more accurately, listening to my "inner voice" trying to "read it aloud"), I find it bothers me a lot.  A quick check on Google Books finds a claimed 432 written instances of , and 910 instances of , which suggests a significant minority of writers don't have a problem with the fact that the two different read's don't sound the same.  When I check the same construction with other verbs that don't have the same written form for past participle and present tense, it seems people nearly always include both (e.g. :1230, :8; :357, :7).  I'm not usually a big fan of "grammatical rules", but it seems to me there "ought" to be a rule that you shouldn't delete one instance of the verb unless it's "the same" as the one you're keeping. And it also seems to me that since language is primarily spoken, "the same" ought to mean "sounds the same when spoken", not "looks the same when written".  Can anyone who knows more than me about formal rules of grammar settle this one?    As an aside, offhand I can't think of any verb where the past participle and present tense sound the same but are written differently (maybe there aren't any), but would deletion be okay in that case? Show that $d(z,a)=|\frac{z-a}{1-\overline{a}z}|$ is a metric on the unit disk For any $z, a$ in the open unit disk, we define$$d(z,a)=\left \vert \frac{z-a}{1-\overline{a}z} \right \vert$$  Show that $d$ is a metric on the open unit disk.     It is easy to show $d(z,a)=d(a,z)$ and $d(z,a)=0$ $\rm iff$ $z=a$. However, I am having trouble showing that it satisfies triangle inequality. Any help would be appreciated! Similar matrices and field extensions Given a field $F$ and a subfield $K$ of $F$. Let $A$, $B$ be $n\times n$ matrices such that all the entries of $A$ and $B$ are in $K$. Is it true that if $A$ is similar to $B$ in $F^{n\times n}$ then they are similar in $K^{n\times n}$?   Any help ... thanks! InDesign CS5 tables: Can I automatically fit rows or columns to the size of content? You know how Excel has the function "Autofit," where you select a whole row or a whole column and it resizes the entire thing to the height or depth of the largest content item? I want to do that in an InDesign table, but with one click. (I know I can drag the column out until the overflow box goes away, but I want to know if there's some automated function I'm overlooking.) Does this automatic function exist anywhere? How to detect Windows 64-bit platform with .NET? In a  2.0 C# application I use the following code to detect the operating system platform:  string os_platform = System.Environment.OSVersion.Platform.ToString();   This returns "Win32NT". The problem is that it returns "Win32NT" even when running on Windows Vista 64-bit.  Is there any other method to know the correct platform (32&nbsp;or 64&nbsp;bit)?  Note that it should also detect 64&nbsp;bit when run as a 32&nbsp;bit application on Windows 64&nbsp;bit. Looking at moving my laundry upstairs, and the right answer is to combine two adjacent closets to get the width and move one of their walls a foot or two into the kitchen to get the depth.  The kitchen floor is 10-inch-square tiles. It would be sort of nice if that continued on into the laundry closet. I do have a full bundle of spare tiles in the basement.   Question: Could/should I plan on the new wall coming in on top of the existing tiles (presumably having to drill to secure the footer without shattering them), or should I plan on removing the ones under the footer and fitting cut pieces back in afterward? What is the difference between "I have a doubt with ...." & "I suspect there is a problem"? Tags are not showing up on the right side of the screen This is on Stack Overflow. On Meta I'm able to see what the tags are on the right side of the screen. In fact, I think yesterday or some point earlier today I saw tags on the right side of the screen (I can't screenshot or remember correctly).  It's right above the asked and active heading.  I know this is minor but what happened to it? It might be useful for browsing instead of having to look at the bottom of the question post.    Found an image on Google and it shows the tags on the right side of the screen: Active Web Site as Gnome Background Is there a way to put an active website, such as Gmail, as your Desktop background in Gnome, running Ubuntu 10.10 64-bit? MS Win calls it "Active Desktop". Which characters are valid in CSS class names/selectors?