what is the meaing of this int _port; declaration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mdshafi01
    New Member
    • Jan 2008
    • 36

    what is the meaing of this int _port; declaration

    Please can any one able to explain about this type of declaration.

    int _port;
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Originally posted by mdshafi01
    Please can any one able to explain about this type of declaration.

    int _port;
    "_port" is variable name. that's it.
    You can use "_" in declaring variables;

    Comment

    • mdshafi01
      New Member
      • Jan 2008
      • 36

      #3
      What is the difference between using
      int port and int _port;

      shafi

      Comment

      • ashitpro
        Recognized Expert Contributor
        • Aug 2007
        • 542

        #4
        Originally posted by mdshafi01
        What is the difference between using
        int port and int _port;

        shafi
        Variable name starting with '_' are mostly used by compiler developers, and system libraries, Indicating the special meaning or importance of that variable.

        You can use it,but it creates other impression.
        Better you use 'iPort'. It is much more readable.

        Comment

        Working...