locked
What are these weird commands?????...what are they called???? how to learn them ???? Can they be used to develop c library for accessing USB webcams...where to start??? please help me...

    Question

  • I am a big noobie in the world of programming and i would really like to learn C a litlle deeper....i saw these lines in stdio.h

     

    "

     

    _Check_return_ _CRT_INSECURE_DEPRECATE(sscanf_s) _CRTIMP int __cdecl sscanf(_In_z_ const char * _Src, _In_z_ _Scanf_format_string_ const char * _Format, ...);

    _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_sscanf_s_l) _CRTIMP int __cdecl _sscanf_l(_In_z_ const char * _Src, _In_z_ _Scanf_format_string_ const char * _Format, _In_opt_ _locale_t _Locale, ...);

    #pragma warning(push)

    #pragma warning(disable:6530)

    #if __STDC_WANT_SECURE_LIB__

    _Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl sscanf_s(_In_z_ const char * _Src, _In_z_ _Scanf_s_format_string_ const char * _Format, ...);

    #endif

    _Check_return_opt_ _CRTIMP_ALTERNATIVE int __cdecl _sscanf_s_l(_In_z_ const char * _

    "


    I really like the way c is and would like to develop and augmented reality application that makes use of two webcams ... as far as i know there are no standard libraries to access usb cams...  so how do i start developing a library that can access USB ports serial ports using C...!!! THANK you!!!

     

    Monday, January 16, 2012 2:17 PM

Answers

  • stdio.h is a standard header.  Header files are a particularly poor way to try to learn C.  Before tackling a complex project like usb cameras, you really need to develop a solid foundation in whatever language you intend to use.

    To answer the question in your subject, the lines that start with # are pre-processor directives.  The other lines are declarations.  The ones you have shown are function prototypes.  These appear overly complex because, in addition to the declaration proper, they contain numerous macros which are defined someplace else.

    • Marked as answer by Lahiruu Wednesday, January 18, 2012 5:35 AM
    Tuesday, January 17, 2012 5:57 AM

All replies

  • stdio.h is a standard header.  Header files are a particularly poor way to try to learn C.  Before tackling a complex project like usb cameras, you really need to develop a solid foundation in whatever language you intend to use.

    To answer the question in your subject, the lines that start with # are pre-processor directives.  The other lines are declarations.  The ones you have shown are function prototypes.  These appear overly complex because, in addition to the declaration proper, they contain numerous macros which are defined someplace else.

    • Marked as answer by Lahiruu Wednesday, January 18, 2012 5:35 AM
    Tuesday, January 17, 2012 5:57 AM
  • Thank you!!!!

     

    Wednesday, January 18, 2012 5:35 AM