![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Apr 2009
Posts: 2
OS: windows xp
|
File not read properly in c++
I'm a newbie in C++ and am trying to open and read a file. However, the program fails to register the whitespaces and end of line. This is how it looks. Is there any other method i can use?
#include <fstream.h> int main() ** char str[2000]; fstream file_op("c:\\Prague_Hotel.txt",ios::in); while(!file_op.eof()) ** file_op.getline(str,2000); cout <<str; } file_op.close(); cout <<endl; // fstream file_op("c:\\castlesteps.txt",ios::in); return 0; } |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
![]() |
| Thread Tools | |
|
|