473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Pointers

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
6 1440
weaknessforcats
9,208 Expert Mod 8TB
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
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
9,208 Expert Mod 8TB
Did you check that your stream pointer is not null?

Like the fopen returned zero.
Dec 3 '15 #4
How do i do that? :-(
Dec 4 '15 #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
donbock
2,426 Expert 2GB
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

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

Similar topics

27
by: Susan Baker | last post by:
Hi, I'm just reading about smart pointers.. I have some existing C code that I would like to provide wrapper classes for. Specifically, I would like to provide wrappers for two stucts defined...
3
by: ozbear | last post by:
This is probably an obvious question. I know that pointer comparisons are only defined if the two pointers point somewhere "into" the storage allocated to the same object, or if they are NULL,...
9
by: Mikhail Teterin | last post by:
Hello! I'd like to have a variable of a pointer-to-function type. The two possible values are of type (*)(FILE *) and (*)(void *). For example: getter = straight ? fgetc : gzgetc; nextchar...
12
by: Lance | last post by:
VB.NET (v2003) does not support pointers, right? Assuming that this is true, are there any plans to support pointers in the future? Forgive my ignorance, but if C# supports pointers and C# and...
14
by: Alf P. Steinbach | last post by:
Not yet perfect, but: http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01.pdf http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01_examples.zip To access the table of...
92
by: Jim Langston | last post by:
Someone made the statement in a newsgroup that most C++ programmers use smart pointers. His actual phrase was "most of us" but I really don't think that most C++ programmers use smart pointers,...
4
by: Josefo | last post by:
Hello, is someone so kind to tell me why I am getting the following errors ? vector_static_function.c:20: error: expected constructor, destructor, or type conversion before '.' token...
25
by: J Caesar | last post by:
In C you can compare two pointers, p<q, as long as they come from the same array or the same malloc()ated block. Otherwise you can't. What I'd like to do is write a function int comparable(void...
54
by: Boris | last post by:
I had a 3 hours meeting today with some fellow programmers that are partly not convinced about using smart pointers in C++. Their main concern is a possible performance impact. I've been explaining...
2
by: StevenChiasson | last post by:
For the record, not a student, just someone attempting to learn C++. Anyway, the problem I'm having right now is the member function detAddress, of object controller. This is more or less, your...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.