I'm using Visual C++ 2005 version 55537-000-0000016-00168 and the only place I can find io.h is in C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\io.h. Is that intentional
Thanks,
Keith MacDonald
I'm using Visual C++ 2005 version 55537-000-0000016-00168 and the only place I can find io.h is in C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\io.h. Is that intentional
Thanks,
Keith MacDonald
What happened to io.h?
mister_ray
This was a bug in one of the intermediate release. In the Beta 2 release you can find this file in the Microsoft Visual Studio 8\VC\Include directory, the expected place.
Ronald Laeremans
Visual C++ team
jason duncan
It is not correct to say that Visual C++ doesn't support those functions, as the code below works. MS would make the porting of old code a lot easier if they copied that io.h file to the normal include folder. I suspect that this is simply a problem with the beta release, because the Visual Studio 2005 documentation still describes Low-Level I/O.
#include <stdio.h>
#include <fcntl.h>
#include "C:/Program Files/Microsoft Visual Studio 8/VC/crt/src/io.h"
void main()
{
int fd = open("/windows/win.ini", O_RDONLY);
if (fd != -1) {
int nb = lseek(fd, 0, SEEK_END);
char* pBuf = new char[nb];
lseek(fd, 0, SEEK_SET);
nb = read(fd, pBuf, nb);
close(fd);
write(1, pBuf, nb);
delete [] pBuf;
}
}
Abdul lateef
It was fixed after that. I verified this on build 050215.
Ronald
SuryaGopi
Grego
Tim Sohn
John Cronin
takashikatori_9000
Thanks for clearing this up, although I thought I had Beta 2 (8.0.50110.28), so perhaps it was fixed after that.
Keith MacDonald