Simple Building for a C++ Hello World
<p>So I am trying to learn C++ while going through the Facebook Puzzles.
To test if submittals to the Puzzle Master are working properly, the <a href="http://www.facebook.com/careers/puzzles.php?puzzle_id=3" rel="nofollow">meepmeep</a> program can be used. </p>

<blockquote>
  <p>The input file will contain ASCII text that is going to be completely ignored by your program. In fact, do not even bother opening up the file, it will just complicate things. </p>
  
  <p>The output should be the string "Meep meep!" (without the double quotes, using exact capitalization) followed by a single newline (don't forget this part!). </p>
</blockquote>

<p>Sounds simple enough. Got everything working the first time around and just use the inbuilt compiler that came from XCode </p>

<pre><code>g++ meepmeep.cpp -o meepmeep
</code></pre>

<p>Send that in and the robot said there are errors so I thought maybe I am not building this properly.</p>

<p>Made a makefile by searching around for how to do makefiles</p>

<pre><code>meepmeep: meepmeep.cpp Makefile
    $(CXX) -o $@ $&lt;
</code></pre>

<p>Still no luck robot would not accept. Of course there could be coding errors/syntax I am not seeing</p>

<pre><code>#include &lt;fstream&gt;
#include &lt;iostream&gt;
using namespace std;

int main(int argc,char *argv[])
{
    cout &lt;&lt; "Meep meep!\n";
    return 0;
}
</code></pre>

<p><strong>So I am building this right or not ? What is the proper way to build ?</strong></p>

<p>My compiler version is 4.2.1</p>

<pre><code>Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
</code></pre>

<p>Could it be that I am not using 4.2.3 ? or the architecture ? (The main question is still the first ... Is the build right or not)</p>

<p>If the code is not right that would be awesome. I wish it is that easy.</p>

<p>I don't want to know how the robot checks it or what tests it uses, please don't tell me. I just want to know if it is a legit build/code so I can go the next step and ask the Puzzle Master about it.</p>
