1. pointer array and array pointer
(1) int * q [10]; pointer array, which declares an array pointing to 10 integer pointer elements.
(2) int (* p) [10]; array pointer, which declares a pointer pointing to 10 integer arrays.
A pointer array is an
I haven't written a BLOG for a long time. ^_^
If you don't know what to write, write something that is easy to ignore.
I. Special string macros
[Cpp]# Define A (x) T _ # x# Define B (x) # @ x# Define C (x) # x
Assume that x = 1, the macro
Insert the set element:
# Include # Include # Include Using namespace std;Void printSet (set s){// Copy (s. begin (), s. end (), ostream_iterator (cout ,","));Int I;For (I = s. begin (); I> = s. end (); I ++) Cout }Void main (){// Create an empty
One keyword:
1. static:
The first role is to modify the variable. Variables are classified into local and global variables, but they all have static memory areas. Because static modified variables always exist in the static memory zone, the value of
The P type is a decimal value. Let's look at a definition first.G_p17 type p decimals 2.
Here, g_p17 has 17 digits (13-digit integer, 1 decimal point, 2 decimal places, and 1 plus or minus sign ). P --> CWhen creating some interface files, such as
1. tm struct
Struct tm {
IntTm_sec;/* seconds after the minute [0-60] */Int tm_min;/* Minutes after the hour [0-59] */Int tm_hour;/* Hours since midnight [0-23] */Int tm_mday;/* Day of the month [1-31] */Int tm_mon;/* Months since January [0-11]
In C and C ++ language development, pointers and memory have always been the focus of learning. C language, as a low-and middle-level language, provides a large amount of memory for direct operations. This maximizes the flexibility of the program
[Cpp] # include int main (void) {int I = 2147483647; unsigned int j = 4294967295; printf ("% d * % d ** % d \ n", I, I + 1, I + 2); printf ("% u * % u ** % u \ n", I, I + 1, I + 2 ); printf ("% d * % d ** % d \ n", j, j + 1, j + 2 ); printf ("% u *
C language source code: [cpp] # include # include # include # define maxsize 600 double lengthcmax, pricemin, falg; double cmax, length, davg; int n; typedef struct station {double price; double length;} station; station sta [maxsize]; int cmp
I,
When I learned about arm, I found that the "pointer function" and "function pointer" are easy to make mistakes. So today, I want to figure it out and find some information, first, the definitions between them:
1. A pointer function is a function
/*************************************** ************************C LanguageAUTHOR: liuyongshui**************************************** ***********************//*Question 16: each student's student ID, name, C ++, high number, and English score
[Plain]/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)* Copyright and version Declaration of the program* All rights
[Plain]/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)* Copyright and version Declaration of the program* All rights
[Plain]/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)* Copyright and version Declaration of the program* All rights
199 is also a prime number.
[Plain]# Include Int main (){Int I;Int j;Int k;Int flag = 0;Int num;Printf ("% 3d is a prime number. \ n", 2); // 2 is the only one with an even number and a prime number. For (I = 1; 2 * I-1 {Num = 2 * I-1; If
[Plain]# Include # Include Int main (){Int I;Int num;Int flag = 1;Char a [100];Gets ();Num = strlen (); If (a [0]> = 'A' & a [0] = 'A' & A [0] {For (I = 1; I {If (a [I]> = 'A' & a [I] = 'A' & A [I] = '0' & a [I] {Flag = 1;}Else{Flag = 0;}If
Compared with the stimulus abort () and exit (), the goto statement seems to be a more feasible solution to handle exceptions. Unfortunately, goto is local: it can only jump to the internal label of the function, but cannot transfer control to any
Previously, we had to implement string splitting by ourselves. Recently, we found that the c standard library already provides this function. I am still not familiar with the standard library, which leads to repeated wheel creation. It is necessary
Print? Quicksum data consists of only 26 upper-case letters and spaces, and must start and end with an upper-case letter. In addition, Quicksum data can be any combination, including consecutive spaces. Quicksum is the sum of the product of each
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.