2 difficult questions....

This is a discussion on 2 difficult questions.... within the C Programming forums, part of the General Programming Boards category; 1.how to make a c source cannot compile or run while the comments had been erase? 2. how to read ...

  1. #1
    Kam
    Kam is offline
    Registered User
    Join Date
    Sep 2002
    Posts
    24

    2 difficult questions....

    1.how to make a c source cannot compile or run while the comments had been erase?

    2. how to read in a HardDisk serial number in C program?

    ^.^

    Sorry for my silly questions, but i have search alot of website and still cannot find any result. I hope here have someone can solve my problem.
    Thanz alot~
    TO RUN FOR FAILURE

  2. #2
    Kam
    Kam is offline
    Registered User
    Join Date
    Sep 2002
    Posts
    24
    Originally posted by Salem
    > 1.how to make a c source cannot compile or run while the comments had been erase?
    Mmm, the first thing the C compiler usually does is remove comments, so a source file without comments is not really much different.

    But some program...
    not in C, if i remove the comment
    it cannot run.....
    how come?

    > 2. how to read in a HardDisk serial number in C program?
    Depends on your OS and compiler - which do you have
    I use Linux, and gcc compile...
    but does it really count on the OS or compiler?
    I thought there will be a command or method to do with it...
    TO RUN FOR FAILURE

  3. #3
    Visionary Philosopher Sayeh's Avatar
    Join Date
    Aug 2002
    Posts
    212
    But some program...
    not in C, if i remove the comment
    it cannot run.....
    how come?
    comments have _nothing_ to do with code. Comments are there solely for you by you. The preprocessor strips all comments prior to the syntax check.

    If you strip comments and can't compile, you either stripped too much, or too little and diddled the some of the code itself.
    It is not the spoon that bends, it is you who bends around the spoon.

  4. #4
    Kam
    Kam is offline
    Registered User
    Join Date
    Sep 2002
    Posts
    24
    Ok, let's forget about the comments one.

    So that means i cannot read in a HardDisk Serial Number?

    Or there still exist someother way to do it?
    TO RUN FOR FAILURE

  5. #5
    Kam
    Kam is offline
    Registered User
    Join Date
    Sep 2002
    Posts
    24
    Originally posted by Salem
    Do some web research
    After a short while, I found this
    I suggest you start there, and see where it leads you

    Hey, thanks alot for the search result!!!
    Maybe we discuss this topic later after i finished the reading.
    And also i found some other information too.
    share it with you later, ok?
    ^.^ Thank You!
    TO RUN FOR FAILURE

  6. #6
    Kam
    Kam is offline
    Registered User
    Join Date
    Sep 2002
    Posts
    24
    Hey....how come i understand none of these above??? hur..?
    Can any one explain to me what it is?
    Willing to learn more....^.^
    THANKS A LOT~
    TO RUN FOR FAILURE

  7. #7
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,670
    Sorry, we kind of got off topic there. Any more questions Kam? Everything working properly?



    ITSA
    Socket Library!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. questions....so many questions about random numbers....
    By face_master in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2009, 08:47 AM
  2. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  3. Several Questions, main one is about protected memory
    By Tron 9000 in forum C Programming
    Replies: 3
    Last Post: 06-02-2005, 07:42 AM
  4. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 08:44 AM
  5. questions questions questions.....
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2001, 07:22 AM

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