Click here to Skip to main content
15,885,216 members
Articles / Desktop Programming / MFC

Solve the Pentomino puzzle with C++ and dancing links

Rate me:
Please Sign up or sign in to vote.
4.80/5 (22 votes)
2 Dec 2011CPOL11 min read 121.2K   3.1K   37  
Program to find all the solutions to a Pentomino puzzle.
#include "CPieza.h"
#include <vector>

using namespace std;

class CPiezaInfo
{
public:
	int Id;
	CString Nombre;
	vector<CPieza> piezas;

	BOOL operator==(const CPiezaInfo& otro) 
	{ return (otro.Id == Id); }
	BOOL operator<(const CPiezaInfo& otro) 
	{ return (otro.Id < Id); }
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Argentina Argentina
System developer from Argentina.

Programmed in VB 5,6,.NET, C#, Java, PL-SQL, Transac-SQL, C, C++ and even some "calculator" language.

Love to build small, useful applications.
Usually building big and complicated apps based on solid, reliable components.

Hobbies: reading, photography, chess, paddle, running.

Comments and Discussions