commenting

This is a discussion on commenting within the C Programming forums, part of the General Programming Boards category; i was just wondering if comments are are ONLY indicated by /* . . . */ or also as // ...

  1. #1
    pseudocode
    Guest

    Question commenting

    i was just wondering if comments are are ONLY indicated by
    /* . . . */ or also as //
    I was reading the 1st tutorial, but it was for C++, but can i use // in C too?
    thanx in advance

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807

    hmm..

    If your compiler support //, sure you can.
    Most compilers support it, but, TC and others, do not support it.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    The use of // for commenting is added to the latest ANSI C standard. Note that older C compilers do not support this, also there are more recent C compilers which do not support it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. method commenting
    By rahulsk1947 in forum C++ Programming
    Replies: 4
    Last Post: 05-18-2009, 08:53 AM
  2. Guidelines for commenting code in C
    By cs32 in forum C Programming
    Replies: 7
    Last Post: 02-18-2008, 02:44 AM
  3. Commenting Style Preference
    By techrolla in forum C++ Programming
    Replies: 16
    Last Post: 12-10-2004, 10:15 AM
  4. the definitive guide to code commenting
    By Aran in forum C++ Programming
    Replies: 5
    Last Post: 09-16-2002, 01:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21