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
J

Jummna

@Jummna
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Missing '=' in if-statement
    J Jummna

    It's one of the nicer things about the DM compiler (though it's looking very long in the tooth nowadays). I just wish all the compiler vendors (MS VC++, Intel, et al) would all look at each other and port the best bits. I still cannot believe that MS C++ has no support for the ubquitous (but non-standard) 0b010101 binary format (or %b in it's printf() function). Interestingly, I once had cause to use some Microsoft supplied headers (MFC or Windows Platform API, can't remember which) but the DM compiler found several such mistakes in the headers. I duly reported them to MS and felt quite smug ;-) Paul

    Clever Code learning

  • Missing empty brackets in function call.
    J Jummna

    Another one (this isn't doing my resume much good, is it?) int some_func () { return flag; } if (some_func) { /* Always end up heree */ } The error is missing out the () after some_func in the if condition. Paul

    Clever Code help question career

  • Missing "case" keyword in switch() statement.
    J Jummna

    OK, so I've done this before, always in a large switch statement where the case names are quite long (and so the missing "case" keyword isn't so obvious): switch () { case A: case B: C: case D: } The C: is seen as a label and compiled as such. Paul

    Clever Code

  • Semicolon after if-statement
    J Jummna

    Again, as I just posted, as someone who uses the Digital Mars C++ compiler (formerly Symantec C++ and before that Zortech or the like) I never get this problem as the compiler always warns of the semi=colon. In the unlikely case where you do want a semicolon, to keep the compiler happy, you just need to insert some C comment: while (flag) /* Wait */; Paul

    Clever Code help

  • Missing '=' in if-statement
    J Jummna

    As someone who uses the Digital Mars C++ compiler (formerly Symantec C++ and before that Zortech or the like) I never get this problem as the compiler always warns of an unintended assignment. If you *do* intend to do an assignement then you need to code: if ((flag=value)==TRUE) ... or similar. I.e. the compiler makes you be explicit about what you're writing.

    Clever Code learning
  • Login

  • Don't have an account? Register

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