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

Pointers

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 ;

for(l=0;l<6;l++)
{
for(i=0;i<16;i++)
fscanf(FL_InPntr, "%x", &IN_FL[i]);

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

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


weaknessforcats
Expert Mod 5K+
P: 9,197
First read this: https://bytes.com/topic/c/insights/7...rrays-revealed

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;

_VALIDATE_RETURN((stream != NULL), EINVAL, EOF);
_VALIDATE_RETURN((format != NULL), EINVAL, EOF);
Dec 3 '15 #3

weaknessforcats
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 ;
}
else
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,396
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.