By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,548 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,548 IT Pros & Developers. It's quick & easy.


P: 5
I am new to C...

#define block_size 16 // data block size

typedef int int32;
typedef int32 block[block_size];

block MX_INP[6] ;
block *IN_PNTR = MX_INP ;

fscanf(FL_InPntr, "%x", &IN_FL[i]);

for(i=0; i<16; i++)
MX_INP[l][i] = IN_FL[i];

here..does MX_INP[l][i] represents 1st element of 1st element of array?

Please Help
Thanks in advance
Dec 3 '15 #1
Share this Question
Share on Google+
6 Replies

Expert Mod 5K+
P: 9,197
First read this:

especially the last example.

Next, load some values in the array and step through with your debugger and see what you get.

Post again if you still have questions.
Dec 3 '15 #2

P: 5
thank you so much....
wen i am trying to execute i am getting error saying debug assertion failed..Expression!=NULL
int retval=0;

Dec 3 '15 #3

Expert Mod 5K+
P: 9,197
Did you check that your stream pointer is not null?

Like the fopen returned zero.
Dec 3 '15 #4

P: 5
How do i do that? :-(
Dec 4 '15 #5

P: 5
I checked...

if (F_InPntr == NULL)
printf("not open\n");
return -1 ;
printf("File open\n");

Mx_Pntr.exe: Native' has exited with code -1 (0xffffffff).

File not open:(

What do i do now?

Thanks in advance
Dec 4 '15 #6

Expert 100+
P: 2,404
Did you use fopen to open the file?
Did you open the file for reading?
Are you sure the file exists?
Dec 4 '15 #7

Post your reply

Sign in to post your reply or Sign up for a free account.