Skip to content

Instantly share code, notes, and snippets.

0
Peter
Arpad
hirbemondo
1114 Budapest, Irinyi Jozsef u. 43.
06702222222
420-0000
peter@arpad.hu
1
Panni
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#include "c-econio\econio.h"
typedef struct bejegyzes{//az adatokat tartalmazo struktúra létrehozása
char keresztnev[50];
char vezeteknev[50];
void ismeretlen_hossz_olvas(FILE *input, char **str)
{
size_t hossz = 1;
*str = malloc(1 + 1); // karakter + null terminátor
char c;
int i;
for (i = 0; fscanf(input, "%c", &c) != EOF && c != '\n'; i++) {
if (i >= hossz) {
hossz *= 2;
*str = realloc(*str, hossz + 1);
cmake_minimum_required(VERSION 3.12)
project(mertanihely C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_gfx REQUIRED)
find_package(SDL2_ttf REQUIRED)
cmake_minimum_required(VERSION 3.12)
project(mertanihely C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
find_package(SDL2_image REQUIRED)
find_package(SDL2_gfx REQUIRED)
find_package(SDL2_ttf REQUIRED)
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
# Copyright 2000-2019 Kitware, Inc. and Contributors
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
cmake_minimum_required(VERSION 3.12)
project(<projekt_nev> C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})
add_executable(<projekt_nev> main.c)
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
#include <time.h>
#include <stdlib.h>
// Konstansok
const double PI = 3.141592654;
const int METER = 20;
#include <stdio.h>
#include <string.h>
#include <ctype.h>
// Fontos a bool típushoz
#include <stdbool.h>
#include <stdlib.h>
const char *oszlopok = "abcdefgh";
typedef struct Sakkfigura {