![]() |
I'm refreshing my C/C++ skills and have encountered something that's stumped me. Dunno why it does this...
I open a .txt file I made with MsDos Editor in my program and use cout to show it. Instead of showing all the text in there, it shows a hex string (0x77fd44). Anybody know why this is? |
It's starting to come back to me... am fixing it now :bye:
|
you are outputting the fileobject to cout instead of it's contents.
|
try this:
Code:
#include <iostream> |
Yup, noticed. I added a do-while loop that takes a line, puts it in a string and couts that, and that till the line's "". Might be buggy when the text looks like this:
Code:
Hello, |
with file exists check:
Code:
#include <iostream> |
The current time is 01:31 AM (GMT) |
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.