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
N

nullusDefectus

@nullusDefectus
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why does most C/C++ developer prefers char *c instead of char* c?
    N nullusDefectus

    char *c better aligns with C/C++ philosophy, but char* c is safer. The syntax char *c says *c (c dereferenced) is a char, which makes c a pointer to char. However, teaching/learning this syntax/philosophy can be hard when people are just getting introduced to pointers. Also, the declaration char *c, d makes c a char*, but d a char. This confuses beginners who are used to declarations such as int a, b which makes both a and b ints. Thus, the declaration char* c is preferred: easier to learn and safer.

    The Lounge question c++
  • Login

  • Don't have an account? Register

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