Jump to content

Mad Libs: Difference between revisions

m
Regularize non-standard header markup
(Added 11l)
m (Regularize non-standard header markup)
Line 61:
</pre>
 
== {{header|Ada}} ==
 
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:
 
 
== {{header|C}} ==
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>
 
== {{header|C++}} ==
<lang cpp>#include <iostream>
#include <string>
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.