1. In C ++, there is almost no need for macros. Use const or enum to define obvious constants, use inline to avoid extra overhead of function calls, use template to portray a family of functions or types, and use namespace to avoid name conflicts.
2
The first question is: Write a function to delete a string.Str1String contained inStr2. This question is not difficult, but there is a KMP OptimizationAlgorithmFor more information, see.
The second question is: the given stringAAndB,OutputAAndB.
Similar to the C ++ version Implementation of bwlabel in MATLAB to mark connected areas, based on opencv, as follows:
////////
/// Bwlabel. cpp
# Include "CV. H " # include" highgui. H " # define no_object 0 # define min (x, y) (x) #
General steps for using VA macros:
Vsptr (Char * Format,...) // Remember the format here
{
Va_list argptr;
Va_start (argptr, format); // enables argptr to point to a bucket starting with format
Va_arg (argptr, type); // returns the current
Recently, I am reviewing QT and preparing for a project. QT Creator will generateCodeIn explicit Dialog (qwidget * parent = 0), such a keyword exists.ExplicitTo modify the constructor. Previously written in WindowsProgramThis keyword is basically
In many cases, you need to create an instance based on the class information. The example of creating an instance using a constructor with parameters is as follows:String assemblyfile;String implclass;String [] impctorsig; // an array of constructor
1. Write the output of the following program
Class ABC;
Void del (ABC * pobj ){
Delete pobj;
}
Class ABC {
Public:
ABC (){
Printf ("ABC/R/N ");
}
~ ABC (){
Printf ("~ ABC/R/N ");
}
};
Int main ()
{
ABC * pobj = new ABC;
Del (pobj );
}
2
C & C ++ has few template engines, and clearsilver is a famous one.And TengThey all have powerful functions. I need a lightweight template engine ctemplate.The design philosophy of ctemplate is lightweight, fast, and logically isolated from the
The last time I wrote a command to encapsulate and call C functions using the APIS provided by python. However, because the method of using APIS is too primitive, it is extremely troublesome for classes or structures. Therefore, I chose boost python
From: http://www.fzitshow.com/redirect.php? Tid = 11971 & goto = lastpost
# Include # Include # Include
// Function prototype;// Void md5_init (md5_ctx * C );// Void md5_update (md5_ctx * C, const void * data, unsigned long Len );// Void md5_final (
Source Address: http://blog.163.com/woshitony111@126/blog/static/71379539201262213418928/
Use of finddata_t
So how do I find files? We need a struct and several functions that may be unfamiliar to everyone. These functions and struct are in the
Document directory
1. Installation
1. 2. Management
2. 1. Install spawn-FastCGI of Lighttpd
2. Install the FastCGI Library
2.3.hello world
2. 4. Start spawn-CGI
2. 5. Modify the nginx configuration file
Below is a document I wrote a long
Type = "system. Diagnostics. textwritertracelistener"
Initializedata = "textwriteroutput. log"/>
System. Diagnostics. Trace this sealed class is actually a static class, because all its methods and attributes are static. The trace class is
1. Foreground call Background:
For communication between C # And JS during webbrowser usage, webbrowser must set the objectforscripting attribute, which is an object. This object can be provided to the script on the webpage loaded by the webbrowser
A log program recently used the method for obtaining the Application Path. By the way, I sorted it out:
1.20.path with .exe
String str1 = process. getcurrentprocess (). mainmodule. filename; // obtain the file name of the currently executed exe. D: \
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