Cpp/JuegoSudoku_FernandoMéndez/Conjunto_1_9.h

30 lines
1.0 KiB
C
Raw Normal View History

2019-06-20 12:06:27 +02:00
//Sudoku - Fernando M<>ndez Torrubiano
#ifndef H_CONJUNTO_1_9_H
#define H_CONJUNTO_1_9_H
#pragma once
#include <iostream>
#include <string>
#include <iomanip>
#include "checkML.h"
//Constantes:
const int MAX_INTERVALOS = 9;
//Tipos:
typedef struct tConjunto_1_9 {
bool boleano[MAX_INTERVALOS];
int cardinal;
};
//Funciones:
void iniVacio(tConjunto_1_9& c); //Inicializa<7A>c<EFBFBD>al<61>conjunto<74>vac<61>o.
void iniLLeno(tConjunto_1_9& c); //Inicializa<7A>c<EFBFBD>al<61>conjunto<74>formado<64>por<6F>todos<6F>los<6F>enteros<6F>del<65>intervalo<6C>[1, 9].
bool pertenece(const tConjunto_1_9& c, int e); //Devuelve un booleano<6E>que<75>indica<63>si<73>el<65>elemento<74>e (n<><6E>entero<72><6F> [1, 9])<29>se<73>encuentra<72>en<65>el conjunto<74>c.
void incluir(tConjunto_1_9& c, int e); //Mete<74>el<65>elemento<74>e<EFBFBD>(<28><>[1, 9])<29>en<65> el<65>conjunto<74>c.
void quitar(tConjunto_1_9& c, int e); //Saca<63>el<65>elemento<74>e<EFBFBD>(<28><>[1, 9])<29>del<65> conjunto<74>c.
int numElems(const tConjunto_1_9& c); //Devuelve<76>el<65>n<EFBFBD><6E>de<64>elementos<6F>que<75> hay<61>en<65>el<65>conjunto<74>c.
void mostrar(const tConjunto_1_9& c); //Visualiza<7A> en<65> la<6C> consola<6C> los<6F> elementos<6F>del<65>conjunto<74>c.
#endif