Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is *_iob* 1

Status
Not open for further replies.

guenter

Programmer
Jul 14, 2000
16
0
0
AT
I encountered this line in a compression source code.

FILE *stream = _iob;

Are there any predefined pointers in C++ ???
thanks for helping

Guenter
[sig][/sig]
 
depends on the header files, what headers do you have defined? [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
 
I've just included the <stdio.h>.
I did a search for it in VC++ and found the following (in stdio.h):
/* Declare _iob[] array */
#ifndef _STDIO_DEFINED
_CRTIMP extern FILE _iob[];
#endif /* _STDIO_DEFINED */

later I encountered:
#define stdin (&_iob[0])
#define stdout (&_iob[1])
#define stderr (&_iob[2])


thanks for helping
[sig][/sig]
 
_iob is a predefined internal array of pointers to any active Input/Output blocks. The first three that are allocated when your program starts up are stdin (also known as _iob[0]), stdout (also known as _iob[1]), and stderr (also known as _iob[2]).

So to answer your original question, yes, there are predefined pointers in VC++. _lastiob is another.

Hope that helps! [sig]<p>Pat Gleason<br><a href=mailto:gleason@megsinet.net>gleason@megsinet.net</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top