1. Define (that is, host variable)The main role of the host variable is to act as an alternative variable, a medium in which the host environment can interact with Oracle . When you define a host variable by define, you must specify the variable
Super MarioTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission (s): 771 Accepted Submission (s): 423
Problem DescriptionMario is world-famous plumber. his "burly" figure and amazing jumping ability
Let's say the following code is required to be compatible with three versionsThis will not complete the task.No mattertypedef enum{first,second,third,}; #define NUM third#if (num = = first) #define VAR 1#elif (num = = SECOND) # Define var
There are many places in the C language where macro definitions are used, such as in header files to prevent header files from being repeatedly included:
#ifndef ctest_header_h
#define CTEST_HEADER_H
/header file content
#endif
Many macro
Mathematical full-Alignment questions:Given the number of M, can be arranged into all cases of n-digit;Example: 3 numbers (three-in-one) are arranged into two digits [containing duplicate numbers] are:11,12, 13,21,22,23,31,32,33;Example: 2 numbers
Topic:The maze of XiaoxiTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 35368 Accepted Submission (s): 10808Problem description Last Gardon Maze Castle Little Nozomi played for a long time (see
We usually do this when we are dealing with 0 points of a function in computational mathematics:1. First judge the 0 point in a monotone interval [a, b] (assuming an increment interval);2. Then determine if f (x) is zero at (a+b)/2 [A/b midpoint ];3.
ClassThe Class keyword provides a containment mechanism that combines the data and the methods of manipulating the data to be used as a built-in type.A class can contain a private part that is accessible only to its members and friend classes, and
Let's look at a few examples
(1) struct{int x; int y;} Test1;
Well, define the structure test1,
test1.x and test1.y can be used in the statement.
(2) struct test {int x; int y;} Test1;
Well, define the structure test1,
test1.x and test1.y can be
1. # difference between define and typedef
# Define is generally used to define constants and statement macro definitions and act as macro replacement during compilation. Of course, you can also complete a small part of the typedef function.
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.