// seged.h #ifndef SEGED_H #define SEGED_H char** inicializalas(int , int ); void felszabaditas(char** , int ); char** create_labyrinth(int* , int* ); void print_board(char**, int , int); void read_string( char[] ) ; void clear_stream() ; #endif //--------------------------------------------- // seged.c #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <math.h> #include <stdbool.h> #include <time.h> #include "seged.h" char** inicializalas(int sorok, int oszlopok) { char** labirintus = (char**)malloc(sorok * sizeof(char*)); if (labirintus == NULL) { printf("Nem sikerult memoriat foglalni.\n"); return NULL; } for (int i = 0; i < sorok; i++) { labirintus[i] = (char*)malloc((oszlopok + 1) * sizeof(char)); if (labirintus[i] == NULL) { printf("Nem sikerult memoriat foglalni.\n"); // Korábban foglalt memóriát felszabadÃtjuk for (int j = 0; j < i; j++) { free(labirintus[j]); } free(labirintus); return NULL; } } return labirintus; } void felszabaditas(char** matrix, int sorok) { if (matrix == NULL) return; for (int i = 0; i < sorok; i++) { free(matrix[i]); } free(matrix); } void clear_stream() { int c; while ((c = getchar()) != EOF && c != '\n'); } void read_string(char text[]) { char* c = fgets(text, 100, stdin); if (c == NULL) return; if (strchr(text, '\n') != NULL) { *strchr(text, '\n') = '\0'; } else { clear_stream(); } } char** create_labyrinth(int* sorok, int* oszlopok) { int n, m; do { printf("Add meg a labirintus sorainak számát (5-10): "); if (scanf("%d", &n) != 1) { clear_stream(); printf("Érvénytelen bemenet, kérlek számot adj meg!\n"); continue; } if (n < 5 || n > 10) { printf("Érvénytelen érték. Kérlek, adj meg egy számot 5 és 10 között.\n"); } } while (n < 5 || n > 10); do { printf("Add meg a labirintus oszlopainak számát (5-10): "); if (scanf("%d", &m) != 1) { clear_stream(); printf("Érvénytelen bemenet, kérlek számot adj meg!\n"); continue; } if (m < 5 || m > 10) { printf("Érvénytelen érték. Kérlek, adj meg egy számot 5 és 10 között.\n"); } } while (m < 5 || m > 10); // Labirintus inicializálása char** labirintus = inicializalas(n, m); if (labirintus == NULL) { printf("Memóriafoglalási hiba történt.\n"); return NULL; } printf("Add meg a labirintus szerkezetét soronként (%d karakter soronként):\n", m); for (int i = 0; i < n; i++) { while (1) { printf("Sor %d: ", i + 1); char szoveg[100]; read_string(szoveg); if (strlen(szoveg) == 0) { printf("Bemeneti hiba.\n"); continue; } if (strlen(szoveg) != m) { printf("Érvénytelen hosszúságú sor. Pontosan %d karaktert adj meg.\n", m); continue; } strncpy(labirintus[i], szoveg, m); labirintus[i][m] = '\0'; // Null-terminátor hozzáadása break; } } *sorok = n; *oszlopok = m; return labirintus; } void print_board(char** labirintus, int N, int M) { if (labirintus == NULL) { printf("Nincs betöltött labirintus.\n"); return; } printf("\nA megadott labirintus:\n"); for (int i = 0; i < N; i++) { printf("%s\n", labirintus[i]); } } //------------------------------ // main.c #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <math.h> #include <stdbool.h> #include <time.h> #include "seged.h" int main() { int N = 0; int M = 0; char** labirintus = NULL; int valasztas; do { printf("\nFÅ‘menü:\n"); printf("1) Kirajzolás – az aktuális labirintus megjelenÃtése\n"); printf("2) KészÃtés – új labirintus készÃtése\n"); printf("3) Mentés – az aktuális labirintus fájlba mentése\n"); printf("4) Betöltés – korábban mentett labirintus betöltése\n"); printf("5) Játék – játék az aktuális labirintusban\n"); printf("6) Kilépés – a program befejezése\n"); printf("Válassz egy opciót (1-6): "); if (scanf("%d", &valasztas) != 1) { clear_stream(); // ÜrÃtjük a bemeneti puffert valasztas = 0; // Érvénytelen választás beállÃtása } else { clear_stream(); // ÜrÃtjük a bemeneti puffert } switch (valasztas) { case 1: print_board(labirintus, N, M); break; case 2: if (labirintus != NULL) { felszabaditas(labirintus, N); } labirintus = create_labyrinth(&N, &M); break; case 3: // Mentési funkció implementálása printf("A mentés funkció még nem került implementálásra.\n"); break; case 4: if (labirintus != NULL) { felszabaditas(labirintus, N); } // Betöltési funkció implementálása printf("A betöltés funkció még nem került implementálásra.\n"); break; case 5: // Játék funkció implementálása printf("A játék funkció még nem került implementálásra.\n"); break; case 6: printf("Kilépés a programból. Viszontlátásra!\n"); break; default: printf("Érvénytelen választás, kérlek válassz a megadott opciók közül (1-6).\n"); break; } } while (valasztas != 6); if (labirintus != NULL) { felszabaditas(labirintus, N); } return 0; }
Mfwdjwdhefiejfh fhiwuewuoioruiwes jkcsjhcksdlalsdjfhgh ejdowkkDIEWHRUEOFIW JIEWFOKDWDJEWIHFIEWFJEWFJIkhfjejfie efjfwjdfe homepets.hu
Help is readily available through various channels, allowing for quick resolutions to any issues. 888starz узбекиÑтан <a href=https://888starz88.pro/ru>https://888starz88.pro/ru/</a>
You registered in our mining affiliate program on January 19, 2021. You have accumulated $3,758,645 in your account, but for some reason you have not logged into your personal account since October 17, 2023. We closed on August 22, 2025. If you want to withdraw your $3,758,645, then pay the withdrawal fee before September 20, 2025, since now all payments to partners are made manually. You can pay the commission here: bitcoin:bc1qa5r6cuvqde4kx5m4s3a5mh2j8arkpt0ve5lf69?amount=0.02371&message=Payment%20of%20the%20fee%20for%20the%20payment%20of%20%243%2C758%2C645%2C%20due%20September%2020%2C%202025&time=1757758069&exp=604800 In other words, send a withdrawal fee of 0.02371 BTC to a bitcoin wallet: bc1qa5r6cuvqde4kx5m4s3a5mh2j8arkpt0ve5lf69 After payment, $3,758,645 will be credited to your account. If you do not pay the commission by September 20, 2025, you will no longer be able to receive your $3,758,645
Users appreciate the straightforward layout of 888starz, which simplifies the gaming experience. 888starz apk download <a href=http://888starz88.pro/fr/application/>https://888starz88.pro/fr/application/</a>
WE PICKED YOU: A SPECIAL PRIZE AWAITS. https://telegra.ph/Win-iPhones-Samsung-09-18-475?5d6k9k4i5b8gpl4
Halfway through the event. iPhone 16 Pros still available. https://telegra.ph/Win-iPhones-Samsung-09-18-3885?9a0j9k5o5n6ggpu The iPhone 16 Pro 512GB is your personal style icon. https://telegra.ph/Win-iPhones-Samsung-09-18-2415?6w8h8h1e4c6dgd2 The subject line that gets opens: You won a phone. https://telegra.ph/Win-iPhones-Samsung-09-18-608?5f5m6j1p6n5z54o Show off your new iPhone 16 Pro and make them jealous. https://telegra.ph/Win-iPhones-Samsung-09-18-442?1s5p0j3o3c8r7ou UPGRADE TO AN S24 ULTRA WITHOUT THE MASSIVE BILL. https://telegra.ph/Win-iPhones-Samsung-09-18-2464?8r3k7j3r4n8gtv8
THE S24 ULTRA IS THE GOLD STANDARD FOR FLAGSHIP PHONES. https://telegra.ph/Win-iPhones-Samsung-09-18-878?3s1l8h1i3r6qtg0 LIMITED BOXES FOR THE S24 ULTRA. CLAIM YOURS NOW. https://telegra.ph/Win-iPhones-Samsung-09-18-3847?6e4k6l2w3r6siqr DRIVE YOUR ENGAGEMENT. WHAT IS IN YOUR LUCKY BOX? https://telegra.ph/Win-iPhones-Samsung-09-18-692?7d6o0h4u6v7rfjq YOUR APPLE IPHONE 16 PRO 512GB IS WAITING TO BE CLAIMED. https://telegra.ph/Win-iPhones-Samsung-09-18-1963?7e8l8j3q6x9sea8 DELIVERY FOR YOUR WINNING GALAXY S24 ULTRA COSTS ABOUT TWO DOLLARS. https://telegra.ph/Win-iPhones-Samsung-09-18-1796?4f3i7j4p6z5so5o
AUF DIESER SEITE WERDEN IMMER WIEDER SCHONE MADCHEN MIT DIESEM SEX BESCHENKT https://lswcore.page.link/?link=http://telegra.ph%2FOnline-Dating-f%25C3%25BCr-Sex-09-23%3F8267
Attractive girls want to meet for sex only on this site https://element.lv/go?url=https%3A%2F%2Ftelegra.ph%2FOnline-dating-for-sex-09-24%3F2237
VERY BEAUTIFUL WOMEN MEET FOR SEX ONLY HERE https://web.ruliweb.com/link.php?ol=https%3A%2F%2Ftelegra.ph%2FOnline-dating-for-sex-09-24%3F6689
Es ist entscheidend, nach der Therapie geeignete Unterstutzungssysteme zu haben. ambulante suchttherapie <a href=entzugsklinik.pro>https://entzugsklinik.pro/</a>
iPhone 17, gaming laptops, gift cards, crypto & more! Join now: https://telegra.ph/Get-a-gift-worth-up-to-10000077-10-23-6686
$111,394.98 IS ACTIVE BUT FRAGILE—SECURE IT NOW https://telegra.ph/Youve-earned-11139498-11-25-4685
YOUR THANKSGIVING PLANS JUST GOT AN $80000 ASSIST http://www.thenewsvault.com/cgi/out.pl?https://90032623.blogspot.com?2857
Don't Hesitate: Claim Your $118,345.89 Jackpot Now https://publicity4music.com/public/link.php?mlu_id=3076&link=https%3A%2F%2F54334087665.blogspot.com%3F0321
Instant Access: Claim Your $118,345.89 Winnings https://telegra.ph/Claim-your-11834589-cash-prize-12-01-1043?91622570
Nincs mentett kép.