From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8987 invoked by alias); 6 Sep 2004 15:28:45 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 8979 invoked from network); 6 Sep 2004 15:28:44 -0000 Received: from unknown (HELO web52902.mail.yahoo.com) (206.190.39.179) by sourceware.org with SMTP; 6 Sep 2004 15:28:44 -0000 Message-ID: <20040906152844.64164.qmail@web52902.mail.yahoo.com> Received: from [202.164.100.133] by web52902.mail.yahoo.com via HTTP; Mon, 06 Sep 2004 16:28:44 BST Date: Mon, 06 Sep 2004 15:28:00 -0000 From: =?iso-8859-1?q?Ankit=20Jain?= Subject: i am sending the file also To: gcc MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-859023831-1094484524=:63217" Content-Transfer-Encoding: 8bit X-SW-Source: 2004-09/txt/msg00041.txt.bz2 --0-859023831-1094484524=:63217 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline Content-length: 987 i am still not able ot understand whats the error the file consists of binary data. basically contains 32 complex nos. they have to be stored in "in" array error: error in reading from file failed :( 1 #include 2 #include 3 #include 4 5 int main() 6 { 7 FILE *fp; 8 fp=fopen("test_data.dat","rb"); 9 int N=32,i=0; 10 complex x,*in; 11 in=malloc(sizeof(complex)*N); 12 if (fread(in,16,32,fp) != 32) 13 printf("error in reading from file failed\n"); 14 else{ 15 for(i=0;i