- Luck Dragon: Asszociációs játék. :)
- Bestx: Budget DIY eGPU USB4/Thunderbolt csatlakozással – egy mining VGA új élete.
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Szólánc.
- sziku69: Fűzzük össze a szavakat :)
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- gban: Ingyen kellene, de tegnapra
- Mr Dini: Mindent a StreamSharkról!
- Lalikiraly: A nagy ő! Stohl...
- sh4d0w: Árnyékos sarok
Új hozzászólás Aktív témák
-
Hali!
Valamiért nem akar ez működni és nem tudom miért.Annyira nem lenne érdekes,mert másik kóddal működik,de meg szeretnék tanulni programozni amihez értenem is kell.HA már VIK akkor csatlakozok,hogy a goto-ért exit jár

#inlude <stdio.h>
#include <stdlib.h>
#include <conio.h>
main ()
{
File*fp
char c;
fp=fopen("C:\prog\blabla.txt","r");
if(fp==NULL){printf("Hiba a fajl olvasasnal");exit(1);}
while(!feof(fp)){
c=fgetc(fp);
fputc(c,stdout);
}
fclose(fp);
exit(0);
}Ez nem akar működni,VS8 fatal error C1021: invalid preprocessor command 'inlude'
Code blocks: progi\main.c|1|invalid preprocessing directive #inlude|
progi\main.c|6|warning: return type defaults to `int'|
progi\main.c||In function `main':|
progi\main.c|7|error: `File' undeclared (first use in this function)|
progi\main.c|7|error: (Each undeclared identifier is reported only once|
progi\main.c|7|error: for each function it appears in.)|
progi\main.c|8|error: `fp' undeclared (first use in this function)|
progi\main.c|8|error: syntax error before "char"|
progi\main.c|9|warning: implicit declaration of function `fopen'|
progi\main.c|9|warning: unknown escape sequence '\p'|
progi\main.c|9|warning: unknown escape sequence '\P'|
progi\main.c|10|warning: implicit declaration of function `printf'|
progi\main.c|11|warning: implicit declaration of function `feof'|
progi\main.c|12|error: `c' undeclared (first use in this function)|
progi\main.c|12|warning: implicit declaration of function `fgetc'|
progi\main.c|13|warning: implicit declaration of function `fputc'|
progi\main.c|13|error: `stdout' undeclared (first use in this function)|
progi\main.c|15|warning: implicit declaration of function `fclose'|
||=== Build finished: 8 errors, 9 warnings ===|Helyette ez müxik,de még alakítani,kell hogy beolvassam dinamikus adatszerkezetbe.
#include <stdio.h>
void main()
{
int c;
FILE *fp;
if( (fp = fopen("C:\\prog\\blabla.txt","rt")) == NULL )
{
printf("\nHiba a blabla.blabl megnyitásánál !");
// Kilépés a programból
exit(0);
}
// Elôolvasás.
c = fgetc(fp);
// Amíg nincs file vége.
while( !feof(fp) )
{
printf("\nA beolvasott karakter : %c",c);
// Olvassa a következôt.
c = fgetc(fp);
}
// A file lezárása.
fclose(fp);
}
Ú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!
- Crucial Pro 32GB KIT DDR5 5600MHz CL46
- Apple Watch Series 9 GPS+Cellular
- Lenovo ThinkPad T14 , AMD Ryzen 5 Pro 4650U, 16GB DDR4, 512 GB SSD,27% ÁFÁS SZÁMLA , 1 ÉV GARANCIA
- Lenovo ThinkPad T14 , AMD Ryzen 5 Pro 4650U, 16GB DDR4, 512 GB SSD,AAM SZÁMLA (vállalkozásoknak is)
- Újszerű villámgyors 4K! Lenovo Thinkpad X1 Carbon G9 (Core I7 16Gb 512Gb 4K 100% Akku) laptop!
- HIBÁTLAN iPhone 13 Pro Max 128GB Sierra Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS4379, 100% Akkumulá
- Újszerű Dell Latitude 5420 - i5 1145 G7 ,16-32GB RAM, SSD, jó akku, számla, 6 hó gar - 01.22
- BESZÁMÍTÁS! ASROCK H510M i5 11400F 8GB DDR4 256GB SSD GTX 1650 4GB Rampage SHIVA DeepCool 400W
- Intel Core i5-9500 / i7-8700T / i7-8700 / i7-9700 /i5-10500T processzorok- számla, garancia
- Számítógép - Gamer PC! Csere-Beszámítás! R5 5600G / RTX 4060 / 32GB DDR4 / 1TB SSD
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


