Hirdetés
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- Brogyi: CTEK akkumulátor töltő és másolatai
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- gban: Ingyen kellene, de tegnapra
- eBay-es kütyük kis pénzért
- bambano: Bambanő háza tája
Ú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!
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Villanyszerelés
- Spórolós topik
- Projektor topic
- Fejhallgató erősítő és DAC topik
- Kormányok / autós szimulátorok topikja
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- A fociról könnyedén, egy baráti társaságban
- OLED TV topic
- Milyen billentyűzetet vegyek?
- További aktív témák...
- Nikon D3 Profi szett
- Vadonatúj, bontatlan iScooter i9Max elektromos roller, 1 év gari 35 km/h
- ADATA XPG Lancer Blade 32GB (2x16GB) DDR5 6000MHz CL34 - XMP/EXPO - 120 hó garancia
- Kingston FURY Beast 64GB (2x32GB) DDR5 6400MHz CL32 - XMP/EXPO - 120 hó garancia
- Kingston FURY Beast 32GB (1x32GB) DDR5 5200MHz CL40 - XMP/EXPO - 120 hó garancia
- Apple iPhone 14 Pro 128GB,Újszerű,Dobozával,12 hónap garanciával
- BESZÁMÍTÁS! ASUS TUF Z270 i7 6700 16GB DDR4 240GB SSD 2TB HDD GTX 1660Ti 6GB Zalman S2 TG 400W
- Asus laptop E1504F Ryzen 3
- REFURBISHED - DELL Precision Dual USB-C Thunderbolt Dock - TB18DC
- Bomba ár! Lenovo ThinkPad X13 G1- i5-10310U I 16GB I 256SSD I 13,3" FHD Touch I Cam I W11 I Gari!
Állásajánlatok
Cég: Laptopszaki Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


