تم النشر منذ 9 Jul 2014 (معدل) لو سمحتو شباب عندي مشكله في تنفزيز داله العرض كل ما انفز بتظهر الرساله دي(thread stopped c:\bc5\bin\mhraja2.exe:fault:access violation at 0x4054d5:write of address 0x44) اشتغلت في ال borland ,واشتغلتها في التربو مانفز معيارجو المساعدهولو في طريثه للعرض اخري اخبروني عنها وشكرا مقدمأ#include<conio.h>#include<stdio.h>#include<stdlib.h>struct student{ int nu; char name[40]; int arbic; int english; int c;};FILE*a, *b;void main(){ struct student st; int x, q;w: clrscr(); printf ( "1:insert \n2: display \n3:serch\n4:delete\n5:update\n6:sort\n7:help\n8:exit" ); scanf ( "%d", &x );//////////////////////////////// begin insert////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ( x == 1 ) {s: a = fopen ( "e:\\mc.txt", "ab" ); if ( a == 0 ) printf ( "errorr" ); clrscr(); printf ( "enter the num :" ); scanf ( "%d", &st.nu ); printf ( "enter the name :" ); scanf ( "%s", &st.name ); printf ( "enter the arabic :" ); scanf ( "%d", &st.arbic ); printf ( "enter the english :" ); scanf ( "%d", &st.english ); printf ( "enter the c :" ); scanf ( "%d", &st.c ); fprintf ( a, "%d%s%d%d%d", st.nu, st.name, st.arbic, st.english, st.c ); fclose ( a ); printf ( "to add new std data press 1 \n to pack press 0" ); scanf ( "%d", &q ); if ( q == 1 ) goto s; else goto w; }///////////////////////////////////////////////////end insert&&&&&&bigin display ////////////////////////////////////////////////////////////////////////// if ( x == 2 ) { a = fopen ( "e:\\mc.txt", "rb" ); if ( a == 0 ) { printf ( "error" ); getch(); exit ( 0 ); } rewind ( a ); fscanf ( a, "%d%s%d%d%d", st.nu, st.name, st.arbic, st.english, st.c ); while ( !feof ( a ) ) { fscanf ( a, "%d%s%d%d%d", st.nu, st.name, st.arbic, st.english, st.c ); printf ( "%d%s%d%d%d", st.nu, st.name, st.arbic, st.english, st.c ); } } getch();} تم تعديل 9 Jul 2014 بواسطه مصطفى 36a2 تنسيق الكود 0 شارك هذا الرد رابط المشاركة شارك الرد من خلال المواقع ادناه
0 قام بالرد منذ 9 Jul 2014 اظن أن الخطأ هناfscanf ( a, "%d%s%d%d%d", st.nu, st.name, st.arbic, st.english, st.c );ضع & قبل اسم كل متحول على حدة 0 شارك هذا الرد رابط المشاركة شارك الرد من خلال المواقع ادناه
تم النشر منذ (معدل)
لو سمحتو شباب عندي مشكله في تنفزيز داله العرض كل ما انفز بتظهر الرساله دي
(thread stopped c:\bc5\bin\mhraja2.exe:fault:access violation at 0x4054d5:write of address 0x44)
اشتغلت في ال borland
,واشتغلتها في التربو مانفز معي
ارجو المساعده
ولو في طريثه للعرض اخري اخبروني عنها وشكرا مقدمأ
تم تعديل بواسطه مصطفى 36a2تنسيق الكود
شارك هذا الرد
رابط المشاركة
شارك الرد من خلال المواقع ادناه