Algorithm development-beyond the hurdle

Source: Internet
Author: User

Algorithm development-beyond the hurdle
Zookeeper

Are you sure you want to see something like this:
NTF_HR (m_pBaseClass-> SetStr (m_hGPROG.hfCoef, (const float *) hfCoef ));

You will be curious about what NTF_HR () is? Function? Isn't it that ugly "?

If you see a bunch of things like the following:
# Ifndef _ CRT_WPERROR_DEFINED
# Define _ CRT_WPERROR_DEFINED
{_ Wperror (_ In_opt_z _ const wchar_t * _ ErrMsg );\
_ Fgetwc_nolock (_ Inout _ FILE * _ File );\
_ Fputwc_nolock (_ In _ wchar_t _ Ch, _ Inout _ FILE * _ File );\
_ Ungetwc_nolock (_ In _ wint_t _ Ch, _ Inout _ FILE * _ File );}
Some great gods do not even write line breaks. They look so awesome that they are all drunk;


No nonsense. Here we will summarize the functions and usage of some macro definitions (the basic usage will not be mentioned, and the tells you ):
The purpose of macro definition is to provide programmers with some convenience during programming, and to improve the program running efficiency to a certain extent. It may not be easy to understand at the beginning, but with the further development, you will deeply feel the rationality of its existence;
If you do not understand the above Code: to simplify it, Give you a sample example as follow:
# Define MYTEST (p) {int jj = p; if (jj> 0) {cout <"I love C ++" <endl ;}\
Else if (jj <0) cout <"do not hate C ++" <endl ;\
Else cout <"Fuck C ++" <endl ;}
If you write a test function, as follows:
Int main ()
{
MYTEST (100 );
MYTEST (0 );
MYTEST (-100 );

}
Look the result, you will be excited to see it, it's rather funny, isn' t it?
Secretly tell you that the slash \ is nothing more than a line break; you will doubt what p is here? He is a code name. What type is p? You have to decide. It can be a handle, any type of variable, or another type of data structure;


Perception: sometimes it is not difficult to come too suddenly, but you do not have the courage to challenge difficulties. as A Software Engineer, you can find answers to many questions from philosophy. Keep A clear mind, continue to charge yourself, you will go further .................

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.