- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: Asszociációs játék. :)
- eBay-es kütyük kis pénzért
- bitpork: Phautós tali a Balcsinál 2025 Augusztus 2 napján (szombat)
- gban: Ingyen kellene, de tegnapra
- vrob: Az utolsó DOS játékok 1996 - 1997-ben, egy korszak lezárul
- hege8888: Retro Kocka Kuckó 3
- Rap, Hip-hop 90'
- droidic: A fapados NAS tuningolása
- D1Rect: Nagy "hülyétkapokazapróktól" topik
Hirdetés
Talpon vagyunk, köszönjük a sok biztatást! Ha segíteni szeretnél, boldogan ajánljuk Előfizetéseinket!
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
válasz
Szőkecica #2419 üzenetére
#include <stdio.h>
int main()
{
int bytes_read;
int nbytes = 100;
char *my_string;
puts ("Please enter a line of text.");
/* These 2 lines are the heart of the program. */
my_string = (char *) malloc (nbytes + 1);
bytes_read = getline (&my_string, &nbytes, stdin);
if (bytes_read == -1)
{
puts ("ERROR!");
}
else
{
puts ("You typed:");
puts (my_string);
}
return 0;
}"The getline function reads an entire line from a stream, up to and including the next newline character. It takes three parameters. The first is a pointer to a block allocated with malloc or calloc. (These two functions allocate computer memory for the program when it is run. See Memory allocation, for more information.) This parameter is of type char **; it will contain the line read by getline when it returns. The second parameter is a pointer to a variable of type size_t; this parameter specifies the size in bytes of the block of memory pointed to by the first parameter. The third parameter is simply the stream from which to read the line."
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- LG K61 128GB, Kártyafüggetlen, 1 Év Garanciával
- Prémium PC házak akár 20-40% kedvezménnyel eladók garanciával, számlával!
- Bomba Ár! Dell Latitude 3190 - Intel N4120 I 4GB I 128GB SSD I 11,6" HD I Cam I W11 I Garancia!
- AKCIÓ! Apple Mac Studio M1 MAX 2022 32GB 512GB számítógép garanciával, hibátlan működéssel
- LG 27GS95QE - 27" OLED / QHD 2K / 240Hz & 0.03ms / 1000 Nits / NVIDIA G-Sync / AMD FreeSync
Állásajánlatok
Cég: FOTC
Város: Budapest