How I can return from function to main function 3 variable (c++). In the code need be function with take a,b,c value [funk()] and then returning to the main and then those values taking into function [rezult()] My code: #include &lt;iostream&gt; #include &lt;cmath&gt; using namespace std; int funk(); float rezult(float a, float b, float c){     //ax^2+bx-c=0     float D, x1, x2, help;     /*     D=b^2-4ac     x1 = ((-1) * b - sqrt(D)) / 2 * a     */     D = b * b - 4 * a * c;     if (D &gt; 0){         help = (-1) * b - sqrt(D);         x1 = help / (2 * a);         help = (-1) * b + sqrt(D);         x2 = help / (2 * a);         cout &lt;&lt; &quot;x1 = &quot; &lt;&lt; x1 &lt;&lt; endl;         cout &lt;&lt; &quot;x2 = &quot; &lt;&lt; x2 &lt;&lt; endl;     }else if (D == 0){         x1 = ((-1) * b) / (2 * a);         cout &lt;&lt; &quot;x1,2 = &quot; &lt;&lt; x1 &lt;&lt; endl;     }else{         cout &lt;&lt; &quot;x1,2 = n&quot; &lt;&lt; endl;     } }  int main() {     float a = 0.00, b = 0.00, c = 0.00; funk(); cout &lt;&lt; a &lt;&lt; b &lt;&lt; c&lt;&lt; endl; rezult(a, b, c); return 0; } funk(){     float a, b, c;     cout &lt;&lt; &quot;a: &quot;;     cin &gt;&gt; a;     cout &lt;&lt; &quot;b: &quot;;     cin &gt;&gt; b;     cout &lt;&lt; &quot;c: &quot;;     cin &gt;&gt; c;     return a, b, c; }  But in function funk(); code don't retuning a,b,c values. Where is mistake? a,b,c need be float type
Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int&amp; quotient, int&amp; remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int&amp; remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.
What does echelon mean? When you solve a system of linear equations, you write down the augmented matrix and reduce this to reduced row echelon form. What is the meaning of the word echelon? In what order are the dated ordered by? Certainly not alphanumeric order.  ls -lt sorts by modification time. But I need creation time. Automatically show which tags were edited in revision history I’ve developed the habit of using the revision summary to indicate which changes I’ve made to the tags while retagging a question.  For instance, if the question originally had tags   and it should be  instead, I write the following in the revision summary:     Edited tags: -cocoa, -touch, +cocoa-touch   which I find useful (and potentially educational) for the OP and other editors.  On the other hand, when an editor doesn’t type a revision summary, Stack Overflow shows     User (timestamp) edited tags   with no indication of the difference between previous tags and the tags set by that edit.  Since there’s a limit on the number of tags, this difference would easily fit in the revision history list of that question. Could this be automatic in case the editor doesn’t fill the revision summary? Is it worth it? What's using up my disk space? My Vista 64 installation has drive C, a 150 GB hard drive.  I also has a 1.5 TB drive D.  My C drive has 12.3 GB free.  I don't know what's using up all the space.  There's almost 83 GB unaccounted for!!!  As per  question and  question, I downloaded  and .  WinDirStat, once I found the right options, tells me there's 82.9 GB of .  SpaceMonger, which has a particularly nice display of the data, tells me there's 82.3 GB "Unscanned", with 2 unscannable folders.  Where do I turn now?  Both tools roughly agree there's a large amount of data on my drive, but neither seem to be able to tell me what.  I've tried the standard approach; disk cleanup, remove hibernation file, set the virtual memory to the D drive instead of the C drive. What is a current replacement of gnome-open command (generic open of files based on the type)?  Before:   gnome-open mydoc.pdf  # opened PDF in default application   Now:  gnome-open The program 'gnome-open' is currently not installed.  You can install it by typing: sudo apt-get install libgnome2-0 Windows 7 time issues I am trying to make a simple pie chart with pgf-pie, but for a reason unknown to me the labels I use don't display correctly.   Here is the chunk of code I've copied from the manual into my .tex file :  \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1] {10/A, 20/B, 30/C, 40/D} \end{tikzpicture}   Here is a screenshot of what I get :    And here is a picture of what I'd like to obtain :   Does anybody knows why I get these numbers and how to get rid of them ?  edit : Here is a minimal working example   \documentclass{article} \usepackage[frenchb]{babel} \usepackage{pgf-pie}  \begin{document} \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1]{10/A, 20/B, 30/C, 40/D} \end{tikzpicture} \end{document} Although many have attempted to explain the difference among \mathrm, \textrm, \textnormal and \text (and others?), I found them misleading.  See for example the LaTeX's Wiki \mathrm explanation   Why is it wrong? Let's try all of them within an article and a beamer and you'll see the difference and, therefore, error.  equation.tex  \begin{eqnarray*}   \int_1^9\! \cos{x} \,\mathrm{d}x &amp; &amp; \textrm{this is textrm}\   \sum_1^9 y                       &amp; &amp; \textsf{this is textsf}\   \prod_1^9 z                      &amp; &amp; \textnormal{this is textnormal}\   \bigcup_1^9 w                    &amp; &amp; \text{and this is just text} \end{eqnarray*}   article.tex  \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}  \begin{document}   \input {equation} \end{document}     And until here everything looks fine...  beamer.tex  \documentclass{beamer} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb}  \begin{document}   \begin{frame}     \input{equation}   \end{frame} \end{document}     And here we can clearly see that \mathrm does not behave as expected, i.e. does not provide a function aspect to the d. Does anyone know what am I supposed to use here instead? Just \text?? o.O  Moreover, I cannot see any difference between \textnormal and \text.  Finally, \textrm looks useless.. Why doesn't the "zig-zag" comb deformation retract onto a point, even though it's contractible? I am starting to read Hatcher's book on Algebraic Topology, and I am a little stuck with exercise 6(c) in Chapter $0$. Unfortunately a picture is involved so it doesn't quite make sense for me to repeat it here - but I'll do it anyways (maybe it helps)     Let $Z$ be the zigzag subspace of $Y$ homeomorphic to $\mathbb{R}$ indicated by the heavier line in the picture:       Show there is a deformation retraction in the weak sense of $Y$ onto $Z$, but no true deformation retraction."   Now the definition for deformation retraction and weak deformation retraction as as follows:  We say that $f: X \to X$ is a deformation retraction of a space $X$ onto a subspace $A \subset X$ if there exists a family of maps $f_t : X \to X$ with $t \in [0,1]$ such that $f_0 = \mathbb{1}$ (the identity) and $f_1 (X) = A$ and also $f_t$ restricts to the identity on $A$ for each $t$.   A weak deformation retraction is almost the same, only that we now relax the conditions $f_1(X) = A$ to $f_1 \subset A$ and, for each $t \in [0,1]$ we require that $f_t(A) \subset A$.  Hence, as far as I understand the question and the concepts involved, I need to show that basically no map can be constructed such that the bold zigzag - line stays put while the thin lines retract to the bold line over a finite time interval $0 \leq t \leq 1$. However, I should be able to show that I can pull the thin lines continously onto the thick line, provided I am allowed to move points on the zigzag line .. is that correct ?  Now, the problem is I can't see why I shouldn't be able to do the former, given that I could find a weak deformation retract. Any help would be great! The residue at $\infty$ I am stuck on the following problem :      $\,\,\,\,$*Problem*$\quad$The residue of an entire function at $\infty$ is $0$.      Solution: True. This follows from the definition of the residue at $\infty$ together with the Cauchy-Goursat Theorem. Another way to see this is to take the Taylor expansion for $f$ at $0$ $\displaystyle f(z)=\sum_{n=0}^\infty a_nz^n$ and replace $z$ with $1/z$ to get the Laurent expansion for $f(1/z)$ at $0$: $\displaystyle f(z)=\sum_{n=-\infty}^0a_{-n}z^n.$ Then we have that the residue at $\infty$ is given by the negative coefficient of the $1/z$ term of    $$ \dfrac1{z^2}f\left(\dfrac1z\right)=\sum_{n=-\infty}^{-2}a_{-n-2}z^n, $$   which is clearly $0$.   I am having trouble to understand the last few lines (in italic) in the given solution. Can someone give lucid explanation? Thanks and regards to all. Showing that two topologies give rise to the same topology Can US stocks list on one stock exchange but trade on other US stock exchanges? I am trying to understand how the US stock market works. From my understanding, there is one stock exchange where a company is &quot;listed&quot;. This stock exchange listing requires the company to adhere to the regulations of the stock exchange where it is listed. Once a company is &quot;listed&quot;, its shares can start to trade on any stock exchange. For example, once a company lists on NASDAQ, its shares can be traded on NASDAQ, NYSE, Boston Stock Exchange, Philadelphia Stock Exchange, National Stock Exchange, EDGX Exchange, EDGA Exchange, NYSE Arca, etc. Is my understanding correct? Is it true that once a stock is listed on a US stock exchange, the stock can then trade on any US stock exchange? Consider the Level 2 quotes for Microsoft (NASDAQ: MSFT). Microsoft is only listed on NASDAQ, but it also trades on the NYSE and other stock exchanges:  My questions are:  Does this mean that companies only need to be listed on one stock exchange in order for their stock to trade on other stock exchanges?  If so, do companies need to adhere to the &quot;listing requirements&quot; of all the stock exchanges where their stock is traded, even though they are not &quot;listed&quot; on those stock exchanges? Does Microsoft have to follow the listing requirements of the NYSE even though it is not listed there?  If stocks can trade on any US stock exchange regardless of which US stock exchange the stock is listed on, why don't NYSE-listed companies reduce their yearly listing fees by listing on NASDAQ instead? Limit position rigidbody How can I limit the position of a rigidbody, between two values ​​if I use this code:  public Vector3 dir;  Rigidbody rb;  void Awake() {     rb = GetComponent&lt;Rigidbody&gt;(); }  void FixedUpdate() {     rb.velocity = new Vector3(0f, 0f, 6f);      rb.AddForce(dir * 1f, ForceMode.VelocityChange); }   If I use Vector3.Clamp then the object will shake When functions commute under composition Today I was thinking about composition of functions.  It has nice properties, its always associative, there is an identity, and if we restrict to bijective functions then we have an inverse.  But then I thought about commutativity.  My first intuition was that bijective self maps of a space should commute but then I saw some counter-examples. The symmetric group is only abelian if $n \le 2$ so clearly there need to be more restrictions on functions than bijectivity for them to commute.  The only examples I could think of were boring things like multiplying by a constant or maximal tori of groups like $O(n)$ (maybe less boring).  My question: In a euclidean space, what are (edit) some nice characterizations of sets of functions that commute? What about in a more general space?   Bonus: Is this notion of commutativity important anywhere in analysis? When I do upgrade it gets stuck here:  user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin   libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90   libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev   libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp   ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade   ubuntu-release-upgrader-core unzip 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0 MB of archives. After this operation, 12.3 kB of additional disk space will be used. Do you want to continue? [Y/n] y 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░   When I do update it gets stuck here:  user@plato:~# apt-get update 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░   I'm able to ping us.archive.ubuntu.com just fine:  user@plato:~# ping us.archive.ubuntu.com PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms ^C --- us.archive.ubuntu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms   What can i do to fix this?    What I have tried so far.  I've tried following directions on this blog:   To force apt-get to use IPv4 exclusively   Create a file in /etc/apt/apt.conf.d/99force-ipv4 Add this line to newly created file Acquire::ForceIPv4 false; Apt-get will now use IPv4 exclusively Why doesn't Ubuntu 16.04 in Windows have ubuntu.exe? Services Actions Missing in Central Admin Does this need a comma? Understanding ROC curve Today, when looking up the definitions of the phrasal verb "take sth up", I noticed that one of them was written like this: "to start or begin something such as a job." For the first time I realised that probably "start" and "begin" don't exactly mean the same thing.So the question is what the difference is between the two, and if there are cases when they mean exactly the same thing.