int is an integer type that defines the type of variable, signed,unsigned int is an unsigned integer type, and it is straightforward to say that a signed unsigned integer is a negative number.The number of bytes defined by the shape is different
1. Declare global variables in Header1.h, header1.cpp define global variables
Header1.h
#ifndef header1_h_
#define HEADER1_H_
extern int g_n;//header file must have extern declaration global variable, no value
//int g_ o; error
//int g_o = 10;
Network Programming
1. TCP and UDP comparisons
TCP is connection-oriented, and each interaction process establishes a streaming socket, and the server waits for the client to submit a connection request to it. Once the client request is accepted,
Friends can be divided into three kinds:
1. Friend function;
2. Friend class;
3. Friend member function;
The benefit of friends, by using the friend function, you can give the function the same access as the class member function, which is a
Conceptvoid pointer data pointer
void Pointer
Basic concepts of void pointers
void means "no type", and void pointer is "No type pointer", and a void pointer can point to any type of data.
so void pointers are generally referred to as universal
CINT is an interpreter using the C + + syntax, CINT compatible with 95% ANSI C code and 85% ANSI C + + code. This basically means that if your code doesn't use a too-specialized C + + syntax, CINT can parse correctly, such as classes, virtual
Accidentally found last year to write the course design homework, writing is also good, involved in a lot of knowledge, and now have some memory, have time to take a good look at C + +.
Topic: Design and implement large integer classes and test
When the Linux side compiled so, a stray ' \357 ' in the program was reported as an error.
There are probably two possible ways:
1. The source file contains Chinese characters (comments are not counted).
2. The source file encoding format adopts
There are many situations in development where you need to export the results of the data displayed in the DataGridView control in Excel or Word, which is what this example does. Since some data columns may not need to be displayed from the database,
Problem description
In C + +, the dynamic application of memory and the release of memory, using Malloc/free and new/delete is generally possible, malloc/free free () function is used to release the malloc () function allocated memory, and malloc ()
Character type of numeric type:
In addition to the number of computer processing information, the main is the characters, characters include numeric characters, English characters, expression symbols, and so on; C # provides character types in
first, GCD and LCM
GCD, belongs to the content of the number theory research.
GCD can be obtained in the following three ways.
LCM, it and the gcd of the flight for the number of product.
Like X,y gcd and LCM.
Remember this formula: x*y= LCM * gcd
#include
#include
#include
openfilename ofn;
A another memory buffer to contain the file name
Char szfile[100];
int main ()
{
//Open a file name
zeromemory (&ofn, sizeof (OFN));
ofn.lstructsize = sizeof (OFN);
Ofn.hwndowner =
C + + file operation detailed
C + + supports the input and output of files through several classes:
Ofstream: File class for write operations (output) (extended by Ostream)Ifstream: File class for read operations (input) (extended by
Used to do WinForm program, incredibly special to do an interface to configure the connection string. Today accidentally discovered: unexpectedly can call the configuration interface in the vs.net2005 directly to handle. The use of methods is also
Sophomore last semester, had written such a piece of code
#include
#include
#include
int main ()
{
Char *ptr1 = "Hello string";
Char *ptr2 = (char*) malloc (strlen (PTR1)-2);
strcpy (PTR2,PTR1);
while (*ptr2!= ' ")
This morning search how to get the number of records that meet a condition in a table and assign an int variable to take a long time, try a variety of methods are useless, but also found that most of Baidu is to give a number of records to meet a
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