Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. file manipulation in c

file manipulation in c

Scheduled Pinned Locked Moved Managed C++/CLI
helpquestion
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    deeps_cute
    wrote on last edited by
    #1

    i am having a file in word. how can i open this as text file in cprogramming. i should not copy the contents, just have to open with text mode programmatically. is anyone having code for this. please help me. thanx in advance.

    Arise Awake Stop Not Till ur Goal is Reached.

    C W 2 Replies Last reply
    0
    • D deeps_cute

      i am having a file in word. how can i open this as text file in cprogramming. i should not copy the contents, just have to open with text mode programmatically. is anyone having code for this. please help me. thanx in advance.

      Arise Awake Stop Not Till ur Goal is Reached.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A word file ? Word has it's own file format, so it's not that simple. When you say C, do you mean C ( you're hopelessly lost ), C++ ( you're still lost ), or C++/CLI ( the forum you asked this in ) ?

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      D 1 Reply Last reply
      0
      • C Christian Graus

        A word file ? Word has it's own file format, so it's not that simple. When you say C, do you mean C ( you're hopelessly lost ), C++ ( you're still lost ), or C++/CLI ( the forum you asked this in ) ?

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        D Offline
        D Offline
        deeps_cute
        wrote on last edited by
        #3

        hi christian graus my question is how to open a file .doc as .txt. try to understand my question. if we have a file in xml we can open it in .txt mode. i need code for this in c programming. theres no separate forum to ask c queries. thats why i asked here.

        Arise Awake Stop Not Till ur Goal is Reached.

        R C 2 Replies Last reply
        0
        • D deeps_cute

          hi christian graus my question is how to open a file .doc as .txt. try to understand my question. if we have a file in xml we can open it in .txt mode. i need code for this in c programming. theres no separate forum to ask c queries. thats why i asked here.

          Arise Awake Stop Not Till ur Goal is Reached.

          R Offline
          R Offline
          Renjith Ramachandran
          wrote on last edited by
          #4

          FILE *fp = NULL; fp = fopen("YourResume.doc", "r"); if(fp!=NULL) { fread(); or fscanf(); fgets()...blah();blah();blah(); } fclose(fp);

          Never Work Hard! - Work Smart!!!

          1 Reply Last reply
          0
          • D deeps_cute

            hi christian graus my question is how to open a file .doc as .txt. try to understand my question. if we have a file in xml we can open it in .txt mode. i need code for this in c programming. theres no separate forum to ask c queries. thats why i asked here.

            Arise Awake Stop Not Till ur Goal is Reached.

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            deeps_cute wrote:

            my question is how to open a file .doc as .txt. try to understand my question.

            I understood it. If you mean to open it, and get back a bunch of garbage, the answer is to use a FILE. If you mean to read the text in a Word doc, I understood you, and gave you the right answer.

            deeps_cute wrote:

            i need code for this in c programming. theres no separate forum to ask c queries. thats why i asked here.

            OK, but if you were going for a completely unrelated forum, why not go for VB.NET, or Vista, or something ? This forum is for .NET C++ questions only. The Visual C++ forum is the closest we have to a C forum.

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

            1 Reply Last reply
            0
            • D deeps_cute

              i am having a file in word. how can i open this as text file in cprogramming. i should not copy the contents, just have to open with text mode programmatically. is anyone having code for this. please help me. thanx in advance.

              Arise Awake Stop Not Till ur Goal is Reached.

              W Offline
              W Offline
              W Balboos GHB
              wrote on last edited by
              #6

              You need, at the very least, to back off a step and understand what it is you are trying to do. I suggest you go to http://www.wotsit.org, which is a source for a huge number of file format specifications. You can then understand what it is that a MS Word file is, how it's layed out, and how you could even begin to attempt your task. Your problem, for now, is that you wish to open it as a 'text' file and it is not a 'text' file.

              "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups