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. C / C++ / MFC
  4. ,printing in tabular format [modified]

,printing in tabular format [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
7 Posts 6 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.
  • G Offline
    G Offline
    GANsJob
    wrote on last edited by
    #1

    hi all, how to print in tabular format with 4 col IN A PRINTER LIKE THIS ---------------------------------------------------------------- ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | INSIDE EACH BOX MY TEXT SHOULD BE APPEARED anyone know plz tell me -- modified at 8:00 Thursday 15th June, 2006

    C N K L 4 Replies Last reply
    0
    • G GANsJob

      hi all, how to print in tabular format with 4 col IN A PRINTER LIKE THIS ---------------------------------------------------------------- ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | INSIDE EACH BOX MY TEXT SHOULD BE APPEARED anyone know plz tell me -- modified at 8:00 Thursday 15th June, 2006

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      :confused: That's not very clear. Where do you need to print it ? On the screen ? You can simply use cout and make a tabulation inside your text.


      Cédric Moonen Software developer
      Charting control

      1 Reply Last reply
      0
      • G GANsJob

        hi all, how to print in tabular format with 4 col IN A PRINTER LIKE THIS ---------------------------------------------------------------- ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | INSIDE EACH BOX MY TEXT SHOULD BE APPEARED anyone know plz tell me -- modified at 8:00 Thursday 15th June, 2006

        N Offline
        N Offline
        NiceNaidu fo
        wrote on last edited by
        #3

        Check this. http://www.gidforums.com/t-4314.html[^] Appu.. "If you judge people, you have no time to love them."

        1 Reply Last reply
        0
        • G GANsJob

          hi all, how to print in tabular format with 4 col IN A PRINTER LIKE THIS ---------------------------------------------------------------- ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | INSIDE EACH BOX MY TEXT SHOULD BE APPEARED anyone know plz tell me -- modified at 8:00 Thursday 15th June, 2006

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          printf("%04.04s%04.04s%04.04s", "a", "ab", "abc"); or CString cs; cs.Format("%04.04s%04.04s%04.04s", "a", "ab", "abc"); But take UNICODE into consideration and adjust the code for UNICODE if you need to. Use minus-sign to right-justify. ("%-04.04s")

          D 1 Reply Last reply
          0
          • G GANsJob

            hi all, how to print in tabular format with 4 col IN A PRINTER LIKE THIS ---------------------------------------------------------------- ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | ---------------------------------------------------------------- | | | INSIDE EACH BOX MY TEXT SHOULD BE APPEARED anyone know plz tell me -- modified at 8:00 Thursday 15th June, 2006

            L Offline
            L Offline
            Laxman Auti
            wrote on last edited by
            #5

            GANsJob wrote:

            how to print in tabular format with 4 col anyone know plz tell me

            You may use C++ IO manipulaters for same. for e.g. setw(size) sets the width of the stream you are suppose to output on console. Knock out 't' from can't, You can if you think you can :cool:

            1 Reply Last reply
            0
            • K kakan

              printf("%04.04s%04.04s%04.04s", "a", "ab", "abc"); or CString cs; cs.Format("%04.04s%04.04s%04.04s", "a", "ab", "abc"); But take UNICODE into consideration and adjust the code for UNICODE if you need to. Use minus-sign to right-justify. ("%-04.04s")

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              kakan wrote:

              Use minus-sign to right-justify. ("%-04.04s")

              That should be left-justify.


              "The largest fire starts but with the smallest spark." - David Crow

              "Judge not by the eye but by the heart." - Native American Proverb

              K 1 Reply Last reply
              0
              • D David Crow

                kakan wrote:

                Use minus-sign to right-justify. ("%-04.04s")

                That should be left-justify.


                "The largest fire starts but with the smallest spark." - David Crow

                "Judge not by the eye but by the heart." - Native American Proverb

                K Offline
                K Offline
                kakan
                wrote on last edited by
                #7

                :-O I should have checked that. Sorry.

                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