#include
typedef struct
{
char imya[40];
char familiya[40];
char otchestvo[40];
int telefon;
int texpasport;
float pages ;
}gor;
void form(char mass[10], char *imya, char *familiya, char *otchestvo, int telefon, int texpasport)
file *f;
gor y;
int i;
if ((f=fopen(mass,"w"))==null) exit(1);
for (i=1; i< =3; i++)
cout< < "vvedite imya: ";
cin> > imya;
cout< < "vvedite familiya: ";
cin> > familiya;
cout< < "vvedite otchestvo: ";
cin> > otchestvo;
cout< < "vvedite telefon: ";
cin> > telefon;
cout< < "vvedite texpasport: ";
cin> > texpasport;
fwrite(& y,sizeof(gor),1,f);
if(ferror(f)! =null)
exit(2);
}
fclose(f);
void vivod(char mass[50])
gor z;
if ((f=fopen(mass, "r"))==null) exit(3);
cout< < "fail: "<
while (! feof(f)) {
fread (& z,sizeof(gor),1,f);
if (! feof(f))
cout< < "imya: "<
cout< < "familiya: "<
cout< < "otchestvo: "<
cout< < "telefon: "<
cout< < "texpasport: "<
void del(char fo[10], char fi[10])
file *f1,*f2;
gor d;
//char temp[40];
if ((f1=fopen(fi,"r"))==null) exit(4);
if ((f2=fopen(fo,"w"))==null) exit(5);
//cout < < "vvedite nazvanie na ydalenie - ";
//cin > > temp;
for (int i=0; i< 3; i++)
fread(& d,sizeof(gor),1,f1);
if (feof(f1)) break;
if (i> 2)
fwrite (& d,sizeof(gor),1,f2);
fclose(f2);
fclose(f1);
void dobav(char fi[10], char fo[10],char *imya, char *familiya, char *otchestvo, int telefon, int texpasport)
int q;
char temp[40];
if ((f1=fopen(fi, "r"))==null) exit(4);
if ((f2=fopen(fo,"r+"))==null) exit(5);
cout < < "vvedite familiu, pered kotorym nuzno dobavit element: ";
cin > > temp;
for (i=0; i< 10; i++)
fread(& d,sizeof(gor),1,f2);
if (feof(f2)) break;
if (strcmp(d.familiya, temp)) break;
q=i;
if (i==q-1)
cout <
void main()
int n=10;
//cout < < "vvedite kol-vo zapisey: - ";
//cin> > n;
//cout <
form("f1.txt",n);
vivod("f1.txt");
del("f1.txt","f2.txt");
cout < < "posle udalenia: \n";
vivod("f2.txt");
getch();
n=1;
system("cls");
dobav ("f2.txt","f2.txt");
cout < < "posle dobavlenia: \n";
vivod ("f2.txt");
Знаки тире как: длинное тире , цифровое тире , горизонтальная линия .
Математические символы такие как: ∫ ∬ ∭ ∮ ∯ ∰ ∱ ∲ ∳
∃ ∄ ∅ ∆ ∇ ∈ ∉ ∊ ∋ ∌ ∍ ∎ ∏ ∐ ∑ − ∓ ∔ ∕ ∖ ∗ ∘ ∙ √ ∛ ∜ ∝ ∟ ∠ ∡ ∢ ∣ ∤ ∥ ∦ ∧ ∨ ∩ ∪ ∴ ∵ ∶ ∷ ∸ ∹ ∺ ∻ ∼ ∽ ∾ ∿ ≀ ≁ ≂ ≃ ≄ ≅ ≆ ≇ ≈ ≉ ≊ ≋ ≌ ≍ ≎ ≏ ≐ ≑ ≒ ≓ ≔ ≕ ≖ ≗ ≘ ≙ ≚ ≛ ≜ ≝ ≞ ≟ ≠ ≡ ≢ ≣ ≤ ≥ ≦ ≧ ≨ ≩ ≪ ≫ ≬ ≭ ≮ ≯ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ ⊊ ⊋ ⊌ ⊍ ⊎ ⊏ ⊐ ⊑ ⊒ ⊓ ⊔ ⊕ ⊖ ⊗ ⊘ ⊙ ⊚ ⊛ ⊜ ⊝ ⊞ ⊟ ⊠ ⊡ ⊢ ⊣ ⊤ ⊥ ⊦ ⊧ ⊨ ⊩ ⊪ ⊫ ⊬ ⊭ ⊮ ⊯ ⊰ ⊱ ⊲ ⊳ ⊴ ⊵ ⊶ ⊷ ⊸ ⊹ ⊺ ⊻ ⊼ ⊽ ⊾ ⊿ ⋀ ⋁ ⋂ ⋃ ⋄ ⋅ ⋆ ⋇ ⋈ ⋉ ⋊ ⋋ ⋌ ⋍ ⋎ ⋏ ⋐ ⋑ ⋒ ⋓ ⋔ ⋕ ⋖ ⋗ ⋘ ⋙ ⋚ ⋛ ⋜ ⋝ ⋞ ⋟ ⋠ ⋡ ⋢ ⋣ ⋤ ⋥ ⋦ ⋧ ⋨ ⋩ ⋪ ⋫ ⋬ ⋭ ⋮ ⋯ ⋰ ⋱ ⋲ ⋳ ⋴ ⋵ ⋶ ⋷ ⋸ ⋹ ⋺ ⋻ ⋼ ⋽ ⋾ ⋿ ✕ ✖ ✚.
Символы как процент -‰
Римские цифры : Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ Ⅻ
ⅰ ⅱ ⅲ ⅳ ⅴ ⅵ ⅶ ⅷ ⅸ ⅹ ⅺ ⅻ.
Цифры в кружках - ⓵ ⓶ ⓷ ⓸ ⓹ ⓺ ⓻ ⓼ ⓽ ⓾ ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓
⓪ ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳
❶ ❷ ❸ ❹ ❺ ❻ ❼ ❽ ❾ ❿ ⓫ ⓬ ⓭ ⓮ ⓯ ⓰ ⓱ ⓲ ⓳ ⓴
Латинские буквы в кружочках:
ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ
ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ
Знаки валютных купюр : $ € ¥ £ ƒ ₣ ¢ ¤ ฿ ₠ ₡ ₢ ₤
Смайлики:㋛ ソ ッ ヅ ツ ゾ シ ジ ッ ツ シ ン 〴 ت ☺ ☻ ☹
Рука , указательнйы палец и многое другое ( ✉ ✍ ✎ ✏ ✐ ✑ ✒,☚☛☜☝☞☟✌,✆ ☎ ☏,
#include
#include
#include
#include
#include
#include
typedef struct
{
char imya[40];
char familiya[40];
char otchestvo[40];
int telefon;
int texpasport;
float pages ;
}gor;
void form(char mass[10], char *imya, char *familiya, char *otchestvo, int telefon, int texpasport)
{
file *f;
gor y;
int i;
if ((f=fopen(mass,"w"))==null) exit(1);
for (i=1; i< =3; i++)
{
cout< < "vvedite imya: ";
cin> > imya;
cout< < "vvedite familiya: ";
cin> > familiya;
cout< < "vvedite otchestvo: ";
cin> > otchestvo;
cout< < "vvedite telefon: ";
cin> > telefon;
cout< < "vvedite texpasport: ";
cin> > texpasport;
fwrite(& y,sizeof(gor),1,f);
if(ferror(f)! =null)
exit(2);
}
fclose(f);
}
void vivod(char mass[50])
{
file *f;
gor z;
if ((f=fopen(mass, "r"))==null) exit(3);
cout< < "fail: "<
while (! feof(f)) {
fread (& z,sizeof(gor),1,f);
if (! feof(f))
{
cout< < "imya: "<
cout< < "familiya: "<
cout< < "otchestvo: "<
cout< < "telefon: "<
cout< < "texpasport: "<
}
fclose(f);
}
}
void del(char fo[10], char fi[10])
{
file *f1,*f2;
gor d;
//char temp[40];
if ((f1=fopen(fi,"r"))==null) exit(4);
if ((f2=fopen(fo,"w"))==null) exit(5);
//cout < < "vvedite nazvanie na ydalenie - ";
//cin > > temp;
for (int i=0; i< 3; i++)
{
fread(& d,sizeof(gor),1,f1);
if (feof(f1)) break;
if (i> 2)
fwrite (& d,sizeof(gor),1,f2);
}
fclose(f2);
fclose(f1);
}
void dobav(char fi[10], char fo[10],char *imya, char *familiya, char *otchestvo, int telefon, int texpasport)
{
int q;
int i;
gor d;
file *f1,*f2;
char temp[40];
if ((f1=fopen(fi, "r"))==null) exit(4);
if ((f2=fopen(fo,"r+"))==null) exit(5);
cout < < "vvedite familiu, pered kotorym nuzno dobavit element: ";
cin > > temp;
for (i=0; i< 10; i++)
{
fread(& d,sizeof(gor),1,f2);
if (feof(f2)) break;
if (strcmp(d.familiya, temp)) break;
q=i;
}
for (i=0; i< 10; i++)
{
if (feof(f2)) break;
fwrite (& d,sizeof(gor),1,f2);
if (i==q-1)
{
cout< < "vvedite imya: ";
cin> > imya;
cout< < "vvedite familiya: ";
cin> > familiya;
cout< < "vvedite otchestvo: ";
cin> > otchestvo;
cout< < "vvedite telefon: ";
cin> > telefon;
cout< < "vvedite texpasport: ";
cin> > texpasport;
cout <
}
}
fclose(f2);
fclose(f1);
}
void main()
{
int n=10;
//cout < < "vvedite kol-vo zapisey: - ";
//cin> > n;
//cout <
form("f1.txt",n);
vivod("f1.txt");
del("f1.txt","f2.txt");
cout < < "posle udalenia: \n";
vivod("f2.txt");
getch();
n=1;
system("cls");
dobav ("f2.txt","f2.txt");
cout < < "posle dobavlenia: \n";
vivod ("f2.txt");
getch();
}