Skip to content

Instantly share code, notes, and snippets.

View luitzenhietkamp's full-sized avatar

luitzenhietkamp

  • 01:11 (UTC +01:00)
View GitHub Profile
// Simple program that helps you format code for reddit
// put your code in a text file called "reddit_code.txt"
// and run the exe.
// You will now be able to find your indented source code
// back in "reddit_code.txt" from which you can straight
// up copy-paste your code into a reddit post.
// Make sure to leave a blank line around your code when
// you post on reddit.
#include <fstream>
#include <iostream>
/*==========================================================
// My implementation of minesweeper using SFML.
//
// Center mouse button functionality has some bugs.
// Also want to implement the same functionality for
// left and right buttons pressed simultaneously.
//
// Still has a lot of clutter in main(), needs to me moved
// to separate functions.
//
// Exercise 3-4
// A little program to find the longest string(s).
// Note: the program does not check for strings that
// are entered more than once and will treat each
// instance separately. Improving the program such
// that each instance is treated separately shouldn't
// be too complicated, but since the minimum of the
// exercise has been met and since basically the same
// thing has been done in the previous exercise, we
// leave it at that.
// Exercise 3-3
// A little program to count how many times
// each distinct word appears in its input.
// Note: the program is not able to count
// words with and without capital letters
// as being the same. It will also distinguish
// words based on whether they are proceded or
// followed by interpunction. Considering the
// scope of this chapter, that is ok however.
#include<algorithm>