Hi,

It's been a while since I've put on my programmer's hat, but I seem to remember some weirdness with streams and functions like this. I know it's a kludge, but if you create a var and assign read()'s value to the var and then output the var to cout does it work?

Paul


On 11 Nov 2005, at 19:49, dan wrote:

I'm trying to read a pixel value from an image and output it to the
console, using

std::cout << read(25, 56);

Should this work? When compiling I get the error message:

main.c: In function 'int main()':
main.c:38: error: invalid conversion from 'int' to 'void*'
/usr/include/unistd.h:312: error: too few arguments to function
'ssize_t read(int, void*, size_t)'
main.c:38: error: at this point in file
make: *** [main] Error 1

If I remove that single piece of code, it compiles and functions fine
(its modified from the burro example).


--
http://www.danicity.co.uk


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
http://pngwriter.sourceforge.net/
PNGwriter-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pngwriter-users



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
http://pngwriter.sourceforge.net/
PNGwriter-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pngwriter-users

Reply via email to