RCRPG/C++98: Difference between revisions

m
Fixed syntax highlighting.
No edit summary
m (Fixed syntax highlighting.)
 
(2 intermediate revisions by 2 users not shown)
Line 3:
* If you enter a room that you visited, at least 3 minutes ago, there is a 40% chance that the loot will re-spawn.
* The Treasure Room is placed at random in the cave.
<span style='font-family: "Linux Libertine",Georgia,Times,serif;font-size:150%;'>[[C++]]</span><hr>
=={{header|C++}}==
<langsyntaxhighlight lang="cpp">
#include <stdio.h>
#include <time.h>
Line 133:
unsigned hashStr( std::string s ) {
unsigned wrd = 0x4e67c6a7, p = 0;
while( s[p] !=< 0s.length() )
wrd ^= ( ( wrd << 5 ) + s[p++] + ( wrd >> 2 ) );
return wrd;
Line 536:
return 0;
}
</syntaxhighlight>
</lang>
9,485

edits