Mad Libs: Difference between revisions
m
Regularize non-standard header markup
Alextretyak (talk | contribs) (Added 11l) |
Thundergnat (talk | contribs) m (Regularize non-standard header markup) |
||
Line 61:
</pre>
==
The fun of Mad Libs is not knowing the story ahead of time, so the program reads the story template from a text file. The name of the text file is given as a command line argument.
Line 477:
==
Dealing with c strings can be quite annoying. This solution implements a dynamic string type with simple functionality which makes the actual madlibs logic a bit clearer. A quicker solution would probably circumvent the copying and moving over characters in the string by utilizing a different data structure that could make use of pointers to input data. This would reduce copying, and require less memory, and allocations for.
<lang c>
Line 637:
</pre>
==
<lang cpp>#include <iostream>
#include <string>
|