[code=c]#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct oseba
{
char ime[20];
char priimek[15];
char ulica[50];
char mesto[50];
char tel_st[10];
short ucni_uspeh;
int stevec;
}pod[4];
void predelaj_osebo( struct oseba pod[],FILE *fd)
{int izbira;int i=0;...
User Profile
Collapse
-
deleting part of file and modyfing it
-
-
ADREEs book - mitola
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct oseba
{
char ime[20];
char priimek[15];
char ulica[50];
char mesto[50];
char tel_st[10];
short ucni_uspeh;
}pod[50];
void vnos(struct oseba pod[],FILE *fd)
{int i;
fd=fopen("DIJAK I.BIN","a+");... -
c binary searching for adress mitola
[CODE=c]#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
struct oseba //struktura osebe , ki jo kasneje uporabljamo v datoteki
{
char ime[20];
char priimek[15];
char ulica[50];
char mesto[50];
char tel_st[10];
short ucni_uspeh;
}pod[100];
void vnos(struct oseba pod,FILE... -
void vnos(struct oseba pod,FILE *fd)
{
printf("Vnesi ime: "); scanf("%s",pod. ime);
printf("Vnesi priimek: "); scanf("%s",pod. priimek);
printf("Vnesi ucni uspeh: "); scanf("%d",&pod .ucni_uspeh);
printf("Vnesi ulico in st: ");scanf("%[^\n]s",pod.ulica );
printf("Vnesi ime mesta: "); scanf("%s",pod. mesto);...Leave a comment:
-
Binary adress book-minor syntax -- mitola
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct oseba
{
char ime[20];
char priimek[15];
char ulica[50];
char mesto[50];
char tel_st[10];
short ucni_uspeh;
}pod;
void vnos(struct oseba pod,FILE *fd)
{
printf("Vnesi ime: "); scanf("%s",pod. ime);
printf("Vnesi... -
poinet on struct corection
i know its easy to corect that mistakes but dunno i simply cant find them.
14 new types may not be defined in a return type
14 two or more data types in declaration of `vnos'
[CODE=c]#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct galaxy{
char tokra[50];
char tauri[50];
char big[50];
char small[50];
}... -
pointer on field. mitola
C language:
[CODE=c]#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{int nak[50];int *i;
srand(time(NULL ));
for(i=&nak[0];i<&nak[50];i++)
{
nak[i]=rand()%50+450;
}
system("pause") ;
return 0;
}[/CODE]
nak[i]=rand()%50+450; here is something wrong but how can... -
C strings and pointers mitola
C program language:
[code=c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
int main()
{char a[100],b[100],*pa,*pb;
pa = &a; pb = &b;
scanf("%s",*pa) ;
scanf("%s",*pb) ;
printf("vnesi 2 niza / input 2 strings");
printf("\nstrin g:... -
i dont know something about files. how can you modify the text by alpahabet. its not meant every leter but the lines for exm.
not modifyed:
number
leter
root
car
auto
modifyed:
auto
car
leter
number
root
and how can you compare two lines when doing with files.Leave a comment:
-
searching hardrive or CD drive for file
im trying to do a browser for hard drive or cd drive. with what functions i can aces a file on the dsk and open it?
how can i aces certain file that aint in the same program as c++ program? -
veeery nice , i was also looking for a nice pointers tutorial very useful. ill get my hands on work right nowLeave a comment:
-
em could you just post link it give me strange results and i do not find corect article i thinkLeave a comment:
-
-
Saving int,char etc... in C++ to work with later
i want to ask how can you save like for example char , or a string in c++ for multiple uses. like when you close the program and when you reopen it you can see what you entered.
i need this to know how exacly ill make the adress book which can be used quite useful -
C++ FILE function
I managed to actually create a file. but then i have problems beacuse i dont know hot to write something in it and read it. i like this function beacuse you can save your data in it.
so im asking you how to make program able to write and read and then also save it.
[code=c]
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE * pFile;
char buffer...
No activity results to display
Show More
Leave a comment: