Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become a C++ Expert!

Join 415,717 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 831 people online right now.Registration is fast and FREE... Join Now!



How to read RTF File Rate Topic: -----

#1 jameel4u  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-March 09


Dream Kudos: 0

Share |

How to read RTF File

Post icon  Posted 31 March 2009 - 01:28 AM

Hi :)

I'm Doing project on E-Book Reader Application
Can Any Help How to read RTF file using Visual C++.
Thanks in Advance.

This post has been edited by jameel4u: 31 March 2009 - 01:45 AM

Was This Post Helpful? 0
  • +
  • -


#2 janotte  Icon User is offline

  • code > sword
  • Icon

Reputation: 298
  • View blog
  • Posts: 3,140
  • Joined: 28-September 06


Dream Kudos: 0

Expert In: C/C++

Re: How to read RTF File

Posted 31 March 2009 - 01:33 AM

Please see the answers already given to your original posting of this question.
http://www.dreaminco...wtopic96361.htm
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is online

  • Rama-llama-ding-dong
  • Icon

Reputation: 1532
  • View blog
  • Posts: 11,251
  • Joined: 23-August 08


Dream Kudos: 50

Expert In: Being annoyed with lazy people.

Re: How to read RTF File

Posted 31 March 2009 - 04:00 AM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

#4 jeff666  Icon User is offline

  • D.I.C Head
  • PipPip

Reputation: 6
  • View blog
  • Posts: 193
  • Joined: 30-December 08


Dream Kudos: 0

Re: How to read RTF File

Posted 31 March 2009 - 05:48 AM

Just use Win32 COM or RE
You don't care of RTF file format.
Was This Post Helpful? 0
  • +
  • -

#5 jameel4u  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 30-March 09


Dream Kudos: 0

Re: How to read RTF File

Posted 31 March 2009 - 09:39 PM

			 #include <iostream>
			#include <fstream>
			#include <string>
			 using namespace std;

		  int main () {
					   string line; //this will contain the data read from the file
				   ifstream myfile ("example.rtf"); //opening the file.
				   if (myfile.is_open()) //if the file is open
				  {
					while (! myfile.eof() ) //while the end of file is NOT reached
				  {
					   getline (myfile,line); //get one line from the file
					   cout << line << endl; //and output it
					}
						 myfile.close(); //closing the file
					}
					else cout << "Unable to open file"; //if the file is not open output <--

					 return 0;
					}

			  


Sir i'm getting some unwanted script while reading the RTF file
So can u help me now what to make changes
to avoid those unwanted scripts
Advance Thanks
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users