C compilers and linker
(1), the first experience
# include
int main (int argc, char* argv[])
{
printf ("Hello world!\n");
return 0;
}
(2), do-it-yourself, compile, connect C program
Install vc++6.0
The CL hello.c/c compiles the build. obj
C + + class definition, if it is only declared, there is no definition, when you build an object with new, you will be prompted to find the symbol error. * * * * glibc detected free (): Invalid pointer:0x0000000000517966 * * * *
Has abandoned
How to
multidimensional arrays and multi-level pointers are also a place for beginners to feel confused. Arrays with more than two dimensions and pointers exceeding two levels are actually not much used. If we can figure out the two-dimensional array and
1. Enter a string of characters to calculate the number of spaces.
#include
#include
int function (char *str);
int main ()
{
Char str[30];
int num = 0;
scanf ("%[^\n]", str);
num = function (str);
printf ("num =%d\n", num);
return 0;
}
int
======================1. Prepare knowledge. ==================
Note: the ' = = ' here is the equal meaning. ' = ' is the meaning of the assignment.
In the Machine world:
The highest digit of a positive number is the sign bit 0, and the highest digit
(i) The main function of the progress bar
Progress bar control is mainly used for data read and write, file copy and disk format, such as the work of the progress of the Progress, such as installation procedures, along with the progress of work
Some predefined macros in the C language standard
The C standard specifies some predefined macros that are often used for programming.The following table is a list of predefined macros that are often used.
__date__Date for preprocessing (string
From C + + programming language 1.6.1 translation is not good please advise
For C Programmer's advice
The more familiar a person is with C, the more difficult it is to avoid writing C + + programs. As a result, some of the potential benefits of C +
To determine if switch ternary expression loop while doing while for break and continue
Judge
Judgment, hence the name of righteousness, is to judge the conditions, meet the conditions (true) what to do, does not satisfy (false) what to do.
#include
#include #include #include #include using namespace Std;
Constructor object, specifying rules for pair comparisons
BOOL Mod_equal (std::p air &p1,std::p air &p2){return P1.first = = P2.first;}
A way to multimap the data in a duplicateint
What is generics
When we write a program, we often encounter two modules that are very similar to each other, just one for the int data, the other for string data, or other custom data types, but there is no way to write each data type separately,
1 Basic explanationsextern can be placed before a variable or function to mark the definition of a variable or function in another file, prompting the compiler to find its definition in other modules when it encounters this variable and function.In
C preprocessing command
A What is preprocessing command
In short, preprocessing is to improve the efficiency of programming, before compiling the program, note that before compiling, according to the preprocessing command to deal with the
overloaded function templates:
#include template int f (T) {return 1;} template int f (t*) {return 2; int main () {Std::cout ((int*) 0) ((int*) 0 )
the overloaded set generated contains two functions:f (int*) and f (int**).The overloaded set
A. Run Gcc/egcsThe most important software development tool in Linux is GCC. GCC is the GNU C and C + + compiler. In fact, GCC can compile three languages: C, C + +, and OBJECTC (an object-oriented extension of the C language). Use the GCC command
C + + sorting algorithm (2009-03-25-09:05:47)
Tags: sorting algorithm loop number
Category: Programming development
The sorting algorithm is a basic and commonly used algorithm. Because of the huge amount of processing in
1. Introduction
In WMI, you can obtain information about a disk drive by using the Win32_Processor object:ManagementClass mc = new ManagementClass ("Win32_Processor");Managementobjectcollection MOC = MC. GetInstances ();foreach (ManagementObject mo
Look at the BSD source code, just know that C language can be implemented through the macro C + + template functions, is too powerful.I also learned to write a stack template. Have any good suggestions welcome to the message AH ~ ~"Stack.h"#ifndef
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