Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Win32: Reading a texts from a file
Name: John Raul II Joven Date: November 15, 2004 at 21:07:26 Pacific OS: Win XP CPU/Ram: 924 oc'd P3 Coppermine
Comment:
I am programming a role-playing game from DOS to Win32 using Microsoft Visual C++ 6 environment. Recently, I have a problem reading texts from files. I've attempted already the various methods to read a file. Actually, I know how to read a file as a whole using fopen(), however, my app is turning crazy: it also reads extra texts that I do not understand. Can you please help me find a good reading a text from file for Win32 apps?
Another question, my VC++6 do not recognize the getline() function even if I already added the <string> and <iostream> header files. I want to use the string class and getline() function that I have used once before using Borland C++ 5.02 compiler. Thanks guys!!!
Note: My game is a text game but hopefully, it will include some graphics when I successfully port it to Win32. During it's DOS time, it was like Bots. See bots2.net
Summary: fgets will read a long of N characters UNTIL it reaches a newline (\n). IE. this will strip one line at a time from your file for the command: fgets( string, 256, fp ); assuming no lines are greater ...
Summary: Hello guys. I am having trouble with my script. I need to get all lines lines to show from a text file. What I have is a chat script, that you can chat to people that use the same server as you (mainl...
Summary: I want to read the data from a file and execute it.Question is as shown. Can anyone provide the code for the below question. Input Description: The first line contains an integer t which is the number...