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. The Lounge
  3. I just spent 10 years making this work.

I just spent 10 years making this work.

Scheduled Pinned Locked Moved The Lounge
c++linux
22 Posts 12 Posters 2 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.
  • M Matthew Faithfull

    I do actually have puts working on Windows and Linux so yes I could do that. The sample apps I've written require printf in a few places although if you use printf with just a format string, no parameters, GCC 'magically' turns it into a call to puts anyway.

    "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

    J Offline
    J Offline
    JackDingler
    wrote on last edited by
    #21

    Though it annoys me that compilers are smart enough to replace what you tell them to do, with what you meant to tell them to do (even if you didn't know you meant to do it), that is a good safety feature. printf's can be very unsafe....

    1 Reply Last reply
    0
    • J JackDingler

      How about simplifying the effort and use puts()?

      C Offline
      C Offline
      Chad3F
      wrote on last edited by
      #22

      puts()? That has waaaaay too much overhead! ;) Try:

      write(STDOUT_FILENO, "Hello World!\n", 13);

      or..

      write(STDOUT_FILENO, "Hello 42!\n", 10);

      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