#include &lt;iostream&gt; #include &lt;conio.h&gt;  using namespace std; #define COUNT 10 void main() {  void print_NUM(void);  int add_values(void);  void print_out(int);  int SUM;   print_NUM();  SUM=add_values();  print_out(SUM); }  void print_NUM() {  cout &lt;&lt; &quot;This program adds &quot; &lt;&lt; COUNT &lt;&lt; &quot; integers\n&quot;;  cout &lt;&lt; &quot;Please enter &quot; &lt;&lt; COUNT &lt;&lt; &quot; integers to be added\n&quot;; }  I can't run it because it said that the main should be int but this is a direct copy from my lecture notes and the only way to get the answer that I need is when I use int main instead. Why is that?
What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:
I have a folder on my desktop which is named ".." (which itself contains subfolders with an empty name). The folder can't be deleted the usual ways, even not when using the CLI. Does anyone know how I can remove this folder on Windows Vista 64-bit?  Renaming does not work, either (obviously).  This is what "dir /x" echoes:  09.10.2009  15:04    &lt;DIR&gt;                       . 09.10.2009  15:04    &lt;DIR&gt;                       .. 08.03.2007  11:18    &lt;DIR&gt;                       cgi-bin                0 Datei(en),              0 Bytes                3 Verzeichnis(se), 45.866.037.248 Bytes frei Possible to draw an Item in a Grid with only 3 sides of a Frame? Is there any way to include an animated GIF directly? Is there any way to include an animated GIF directly in either PDFLaTeX or XeLaTeX? I realize the animate package can include animations in a PDF, but it doesn't support animated GIFs and you have to split them up manually into EPS or PNG files as far as I can tell. Has anyone had any success using twitters typeahead.js within visualforce pages? What is the difference between "meet" and "meet with"?  For example, which of these should I say?        I met my boss yesterday    I met with my boss yesterday   I'm meeting my friends tonight    I'm meeting with my friends tonight My issue is that I'm trying to write variable names in italic, but as some of them have underscores in their names, LaTeX assumes that I am writing an equation and it messes up the rest of my document after that point. Here is a sample of my code: As variable \textit{sensor.linear_acceleration} is a matrix  The underscore in linear_acceleration is what makes my whole document math modded, and is a matrix renders as if it was an equation. How can I display that underscore in italic without LaTeX making everything an equation? Let $X$ be a set and consider the collection $\mathcal{A}(X)$ of countable or cocountable subsets of $X$, that is, $E \in \mathcal{A}(X)$ if $E$ is countable or $X-E$ is countable. If $X$ is countable, then $\mathcal{A}(X)$ coincides with the power set $\mathcal{P}(X)$ of $X$. Now suppose that $X$ is uncountable. Assuming the axiom of choice, we can conclude that $\mathcal{A}(X) \ne \mathcal{P}(X)$, since $|X| = |X| + |X|$. So the question is:     Can we prove in ZF that $\mathcal{A}(X) \ne \mathcal{P}(X)$ for every uncountable set $X$?   I'm assuming that a set $X$ is uncountable if there is no injective function $f : X \rightarrow \mathbb{N}$. Union of ascending chain of Topologies Combining two covariance matrices How can I take a self-portrait without using a remote?  My camera is a Canon Powershot SX210 IS. I do not have a remote, but I do have a tripod. Can the off-regional pokémon hatch from eggs? Some people claim you can get the pokémon that are not in your region from eggs. Is this only a rumour or actually true? I've seen off-regional pokémon in gyms nearby but I can't rule out that the owner had been abroad or maybe even used location spoofing. Show that the rings $2\mathbb{Z}$ and $3\mathbb{Z}$ are not isomorphic. Sometimes a suggested edit is  because of a concurrent direct edit that takes precedence.  Since this is no fault of the edit suggestor, such rejections should not count against the suggestor when counting .  Here are some examples where it happened: How to retrieve multiple rows from database in PHP Where are the evolutionary "inbetweeners"? The problem I've always had with evolution is the actual lack of variation between animals. More specifically, the lack of observable gradual change between species.  Take for example the hammerhead shark. It obviously has a strong connection with a normal shark, but where's the "half-hammerhead" shark? Where's the species that only has a SLIGHTLY wider head?  I really doubt that a single mutation on a normal shark resulted in a head shaped like that, it had to happen gradually. Right? As far as I understand, evolution works by random mutation in a child being somehow slightly beneficial to that animal so it get's to live longer and reproduce more, eventually resulting in it's genetic material in dominating the inferior ones before it. But if it was for whatever reason beneficial to have a slightly wider head, why don't all the sharks have slightly wider heads now? On the other hand, if it wasn't beneficial, how come the hammerhead still exists?  Furthermore, I feel like some characteristics of a certain animal can't really have gradual benefits. There's a lizard that shoots blood out of it's eyes. The original ancestor certainly didn't, and I'm sure that if it's child only bled slightly from it's eyes it wouldn't really help if much in life. So for it to actually become beneficial, it seems to me that there had to be a ton of lizards that had a disadvantage of bleeding slightly. In fact, there had to be so many that they evolved even further in the same direction and kept doing that until they bled so much it's an actual benefit (sorry for this turning so gross). So why did the inbetweeners survive long enough to evolve even more, and why did they THEN die out? How do I change the default session for when using auto-logins? When autologon is active, lightdm will start the Unity 3D session, not the 2D (or any other shell that I want to auto-login to).  Is there a way to start the shell I want automatically (autologon)?  Anyway, if autologon is disabled, the last used session is launched, and that's fine. I just want to choose which is default with autologon. How do I drag and drop files into an application? I've seen this done in Borland's  environment, but I'm not sure how to go about it for a C# application I'm working on. Are there best practices or gotchas to look out for? My actual question is to find the number of transversal given a collection of set ...  After a little bit of study it has come down to:  How can we count the number of matchings in a bipartite graph with parts of size $m$ and $n$ such that it covers all $m$ vertices of the first part, $m \le n$?  I already know that there is a way to count the number of perfect matchings in a bipartite graph with $m=n$ using the permanent of its (square) incidence matrix. Why am I still getting a password prompt with ssh with public key authentication? I'm working from the URL I found here:    My ssh client is Ubuntu 64 bit 11.10 desktop and my server is Centos 6.2 64 bit. I have followed the directions. I still get a password prompt on ssh.  I'm not sure what to do next. Before you disagree with me with a downvote, or just want to be funny, please hear me out. From the :  The upvote privilege comes first because that's what you should focus on: pushing great content to the top. Downvoting should be reserved for extreme cases. It's not meant as a substitute for communication and editing.  I have honestly never seen a downvote reserved for an extreme case. The process is usually 1) downvote post if it's bad and don't comment. (Not much of a process, is it?) As you stay on the site longer and longer, you develop a carelessness towards downvotes (as I have), but for new users, it's really discouraging.  question inspired me to [ask balpha to] make , which is a list of users with 1 rep who have the  badge. That's the closest I could get to new users who deleted their own posts after downvotes came in. Don't get me wrong, I know the argument about being nice to new users very well, but I still believe it to be an issue. And since , users are much more inclined to go the lazy route and downvote bad questions. No alternative measures (see below) are taken, for the most part. Personally, I leave a comment and don't downvote until the asker shows no interest in fixing their post. The only other measure taken to discourage downvotes (on answers) is the -1 rep punishment to the downvoter, which is absolutely meaningless and inconsequential anyways. How are we supposed to educate new users when we don't teach them what to do, don't direct them to the FAQ, and discourage them with downvotes right off the bat?  Instead of voting down: If the post is spammy or offensive — flag it. If the question is duplicate or off-topic — flag it for moderator attention. If something is wrong, please leave a comment or edit the post to correct it.  We claim to discourage downvoting, yet I see answers like  that encourage us to downvote first and ask questions later when a question is simply unclear or effortless. It's just an awful chain reaction. A new user comes to the site asking a question, but that doesn't work out too well, so they get downvotes, delete the question in shame, and don't get the help they deserve as a fellow writer of code and programmer. Strip away the quality of the site for a moment: the core functionality of this site, and the only reason I and a lot of other users are (still) on it, is to receive and give help to/from others. I enjoy making sure fellow programmers get the answer they need, because this site has helped me get mine when I needed them. Quality can still be maintained if content is fixed rather than downvoted more often. So can we stop discouraging new users from continuing to use this site and actually start to discourage downvoting? I think we need to encourage effort towards teaching and helping new users understand the system and why their post is bad rather than slapping them in the face with downvotes that they don't know how to interpret anyways. I'm leaving ways we can do this up to others. My first thought was to increase the punishment for downvoting answers and to no longer make question downvotes free, but those wouldn't be well-received, judging by the history of similar suggestions. .