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. How to use overwriting circular buffer for printing strings in c programming?

How to use overwriting circular buffer for printing strings in c programming?

Scheduled Pinned Locked Moved C / C++ / MFC
hardwaretutorialquestion
4 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.
  • S Offline
    S Offline
    ShashiAcharya
    wrote on last edited by
    #1

    Circular buffer in embedded c

    L J CPalliniC 3 Replies Last reply
    0
    • S ShashiAcharya

      Circular buffer in embedded c

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Please read http://www.codeproject.com/Messages/2922875/HOW-TO-ASK-A-QUESTION.aspx[^].

      1 Reply Last reply
      0
      • S ShashiAcharya

        Circular buffer in embedded c

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        A 'string' in c is nothing more than a sequential sequence of bytes terminated with a null. But a circular buffer is not guaranteed to be sequential. So without at least some further restrictions it cannot be done.

        1 Reply Last reply
        0
        • S ShashiAcharya

          Circular buffer in embedded c

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          You may either want to use the circular buffer for holding the pointers of the actual strings or, more likely, for holding the strings themselves. In the first case coding is pretty straightforward (you may use Wikipedia's circular buffe[^]r page for inception). On the other hand, the second case is bit more complex, since you have to explicitely manage blocks of bytes (the strings) in the circular buffer.

          THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite

          In testa che avete, signor di Ceprano?

          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