Wednesday, August 31, 2011

C++: Unicode

Character sets
http://www.microsoft.com/typography/unicode/cs.htm



Support for Unicode
http://msdn.microsoft.com/en-us/library/2dax2h36.aspx

Unicode is a specification for supporting all character sets, including character sets that cannot be represented in a single byte. If you are programming for an international market, consider using either Unicode or multibyte character sets (MBCSs) or enabling your program so you can build it for either by changing a switch.

A wide character is a 2-byte multilingual character code. Most characters used in modern computing worldwide, including technical symbols and special publishing characters, can be represented according to the Unicode specification as a wide character. Characters that cannot be represented in 1 wide character can be represented in a Unicode pair with Unicode's surrogate feature. Because each wide character is always represented in a fixed size of 16 bits, using wide characters simplifies programming with international character sets.

Generally, wide characters take more space in memory than multibyte characters but are faster to process. In addition, only one locale can be represented at a time in multibyte encoding, whereas all character sets in the world are represented simultaneously by the Unicode representation.



Unicode Programming Summary
http://msdn.microsoft.com/en-us/library/dybsewaf%28VS.80%29.aspx

With _UNICODE defined, _T translates the literal string to the L-prefixed form; otherwise, _T translates the string without the L prefix.



Multibyte Character Sets
http://msdn.microsoft.com/en-us/library/5z097dxa.aspx



Windows ANSI character set

C++ : Literals

http://msdn.microsoft.com/en-us/library/c70dax92%28v=vs.80%29.aspx

Invariant program elements are called "literals" or "constants." The terms "literal" and "constant" are used interchangeably here. Literals fall into four major categories: integer, character, floating-point, and string literals.

Friday, July 22, 2011

C++ - MD and MT compile option


Simple explanation



Microsoft Visual C++ Static and Dynamic Libraries





http://shitohichiumaya.blogspot.com/2009/10/visual-c-md-and-mt-compile-option.html

- MT: Multi-threaded static library. This is good for distribution a whole application package, since everything is statically linked and there is no dependency to the environment.

- MD: Multi-threaded Dynamic link library. If you distribute some library instead of a whole application, dynamically linked runtime is better since, some part of the program uses one version of runtime, and the other uses different version,this causes a trouble. For example, 'new'ed some memory at one version of runtime, and 'delete'd by other version of runtime could be a trouble.




http://dev.mobixo.net/2008/03/use-mtd-or-mdd.html



/MD
causes application to use the multithread- and DLL-specific version of the run-time library. Applications compiled with this option are linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR80.DLL, which must be available at run time to applications linked with MSVCRT.lib.

/MT

causes your application to use the multithread, static version of the run-time library. Defines _MT and causes the compiler to place the library name LIBCMT.lib into the .obj file so that the linker will use LIBCMT.lib to resolve external symbols.

C++ - The #include Directive

http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.80).aspx



#include  "path-spec"
#include  <path-spec>

Syntax FormAction
Quoted form
This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable.
Angle-bracket form
This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.

web terminologies

AJAX - http://en.wikipedia.org/wiki/Ajax_(programming)
Document Object Model (DOM)
The Document Object Model (DOM) is a cross-platform andlanguage-independent convention for representing and interacting with objects in HTMLXHTML and XML documents.
http://www.quirksmode.org/dom/intro.html

Difference Between Unicode and ASCII,

http://www.differencebetween.com/difference-between-unicode-and-ascii/