Note that there are some explanatory texts on larger screens.

plurals
  1. POStarting C++ in VS - Build succeded but no output
    text
    copied!<p>Coming from web development I have been trying to get familiar with compiled programming, specifically C++. I usually run into issues like this and end up getting frustrated and putting it off for another month. Hopefully this is something simple.</p> <p>I used a basic Hello World script:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main () { cout &lt;&lt; "Hello World!"; return 0; } </code></pre> <p>Which when I build I get the following with no "Hello World" output:</p> <pre><code>1&gt;------ Build started: Project: Hello World, Configuration: Debug Win32 ------ 1&gt;Build started 3/29/2011 10:17:23 AM. 1&gt;PrepareForBuild: 1&gt; Creating directory "c:\users\jeff\documents\visual studio 2010\Projects\Hello World\Debug\". 1&gt;InitializeBuildStatus: 1&gt; Creating "Debug\Hello World.unsuccessfulbuild" because "AlwaysCreate" was specified. 1&gt;ClCompile: 1&gt; HelloWorld.cpp 1&gt;LinkEmbedManifest: 1&gt; Hello World.vcxproj -&gt; c:\users\jeff\documents\visual studio 2010\Projects\Hello World\Debug\Hello World.exe 1&gt;FinalizeBuildStatus: 1&gt; Deleting file "Debug\Hello World.unsuccessfulbuild". 1&gt; Touching "Debug\Hello World.lastbuildstate". 1&gt; 1&gt;Build succeeded. 1&gt; 1&gt;Time Elapsed 00:00:01.47 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== </code></pre> <p>Which seems like it should be working :/</p> <p>EDIT: :( Of course I just needed to run it. Should the cmd stay open? It just flashes away for me and I get this in my output:</p> <pre><code>'Hello World.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file 'Hello World.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file 'Hello World.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file </code></pre> <p>EDIT 2: Adding cin.get(); has it displaying now, thanks guys...I'm sure it won't be long before I'm back</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload