Use of C ++ macros

1. Conditional Include As follows: # Ifndef main_h _ # Define main_h _ ...... # Endif When we see the header file above, we will see that the function is to prevent this header file from being included multiple times, and repeated definitions

Split function written in C ++

Recently, I accidentally found a split function written by someone else on the Internet: vector split (const string & SRC, string delimit, String null_subst = "") ...{ If (SRC. Empty () | delimit. Empty () throw "split: empty string 0 "; Vector

C # method set for obtaining the current program running path

Reproduced, original address: http://www.cnblogs.com/cocoulong/archive/2010/01/30/1660119.html   // Obtain the complete path of the current process, including the file name (process name ).String STR = This. GetType (). Assembly. location;Result: X:

Extern "C" in C/C ++"

1. extern is a keyword in C/C ++ that indicates the range (visibility) of functions and global variables. This keyword tells the compiler, the declared functions and variables can be used in the "Global" range. 2. exterc "C" ("C" must be capitalized)

N5: C/C ++ website

1. A guy wrote a webpage to view the C/C ++ syntax in BNF format. 2. There is something called FFI (Foreign function interface) that contains many languages and information about many platforms. 3. stackoverflow, Codeproject, C ++ 11 FAQ,

Pure C string operation function implementation (strcpy, strncpy, memcpy, memset, strcat, strlen... )

Document directory Memcpy and egg pain writing: The implementation of string operation functions in C/C ++ is very skillful. Although these functions are simple and self-implemented, there are still many things to consider, therefore, if you have

C language-pointers and functions (2)

1. Input three numbers and output them in ascending order; # Include Int min (int * P1, int * P2){If (* P1> * P2)Return * P2;ElseReturn * P1;}Int max (int * P1, int * P2){If (* P1 Return * P2;ElseReturn * P1;} Void sort (int * P1, int * P2, int *

From a simple example, enter the hall of C ++ Program Design

1. assign an array value to another array and rewrite the code to a vector.   # Include using namespace STD; int main () {size_t array_size = 7; int ia1 [] = {0, 1, 2, 3, 4, 5, 6}; int ia2 [array_size]; // copy the array in C ++. You can only

C Language -- pointer and array (2)

1. Write a function using a pointer to exchange two integer numbers a and B read from the keyboard; # Include # Include Void swap (int * P1, int * P2 ){Int temp;Temp = * P1;* P1 = * P2;* P2 = temp;} Int main (){Int X, Y;Printf ("enter two numbers:

C ++ multi-thread programming Learning (1)

Document directory 1. Basic concepts of the thread, the basic state of the thread, and the relationship between states. 2. Differences between threads and processes 3. Thread Synchronization and mutex 4. Causes of deadlocks and how to avoid

C: 1-7

# Include /* Function power test */ Int power (int m, int N ); Main () { Int I; For (I = 0; I Printf ("% d/N", I, power (2, I), power (-3, I )); Return 0; } /* Power function: Calculate the N power of the base number, where n> = 0 */ Int power

C ++ object model notes: overview

This series of articles is a book note for Lippman's "inside the C ++ object model. 1. Books on C ++ made by author Lippman: C ++, one of the first compilers: C ++ Primer: The Encyclopedia of C ++, which is the same name as C ++ programming

(C) functions implemented by header files

In the C language, functions are implemented directly in the header file for convenience (the synonym for convenience is laziness. So what's the problem? In the following example, there are only three files. /* Fun. H */# Ifndef fun_h# Define

Implementation Mechanism of the C ++ virtual base class: Note

Original article: http://blog.csdn.net/jiangnanyouzi/article/details/3721091#reply In "Deep Exploration C ++ object model", there is a question that is frequently asked by the technical staff when they go to a company interview: In C ++, OBJ is a

C ++ socket TCP "Hello world !"

This is the C/S structure in the C ++ Socket network program. TCP "Hello world! ", There are two console projects: //////////////////////////////////////// /// // // tcpserver. CPP # include # include # pragma comment (Lib, "ws2_32.lib ") #

C ++ socket UDP "Hello world !"

This is the C/S structure in the C ++ Socket network program. UDP "Hello world! ", There are two console projects: //////////////////////////////////////// /// // // udpserver. CPP # include # include # pragma comment (Lib, "ws2_32.lib ") #

Configure the C/C ++ development environment in Ubuntu -- helloworld!

gtk

Although the Ubuntu version is already 9.10, I don't want to upgrade it. After all, the 256 memory is really hard to handle. For me, stability is the most important thing. The hardware does not need to be too high, so it is still honestly stuck at 9.

C # program file

The bin directory is used to store compilation results. Bin is the abbreviation of binary binrary, because the program files compiled by C are binary files, which have two versions: Debug and release, the corresponding folders are bin/debug and

Learn about 50 good websites in C/C ++

1. http://snippets.dzonE.com/tag/c/-- Thousands of useful C language source code snippets2. http://www.hotscriptS.com/category/c-cpp/Scripts-programs/Hotscripts-- Provides hundreds of C and C ++ scripts and programs. All programs are classified into

Stream, byte, character, and string in C #

First, you must understand what they are composed: Stream: Binary Byte: unsigned integer Character: unicode encoded character String: Multiple Unicode characters   In. net, how can they be converted? Generally, the following rules are

Total Pages: 5902 1 .... 4174 4175 4176 4177 4178 .... 5902 Go to: GO

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.