Technoholik

Your Digital Companion

Saturday, June 25

New Facebook App to Notify Users about Malicious Content

At a time when the virtual space, especially social networks are rife with spam attacks, and hackers on the loose, an attempt by a bunch of students surely seems to be a force to reckon with.

 

App

 

Students belonging to the University of California’s graduate class, Md. Sazzadur Rahman and Ting-Kai-Huang, and a company run by the school’s alumnus, put their heads together and developed a free Facebook application called MyPageKeeper.org, which the founders claim is capable of detecting spam, malware that are found on the walls, and news feeds of the user’s Facebook account. The app, according to the founders aims at delivering real-time protection from viruses, spam to the users. Web protection service, StopTheHacker.com encouraged the construction of the app. 

The recent spate of malware attacks on Facebook, and other web domains have given more than enough reasons for attempts like these. Facebook, at present has over a staggering 700 million members, and miscreants have found it to be a place where it was easy to target people into letting spam into their profiles. Contradicting this, MyPageKeeper.org once installed into one’s profile, begins actively scanning the user’s wall posts, news feeds to see if any malicious content was posted. If found any, the app would immediately notify the user of the same and prompt him to remove the malicious content. The app, for now can be downloaded for free offwww.MyPageKeeper.org. Although just recently started, the app already has won the confidence of several users.

Friday, June 24

All U Need To Know : HTML 5

 

HTML 5HTML5 is a language for structuring and presenting content for the World Wide Web, a core technology of the Internet. It is the fifth revision of the HTMLstandard (originally created in 1990 and most recently standardized as HTML4 in 1997) and as of June 2011 was still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsersparsers etc.). HTML5 is intended to subsume not only HTML4, but XHTML1 and DOM2HTML (particularlyJavaScript) as well.

Jobs Takes a Bite Out of Microsoft, Google, Amazon

For the first time we all knew what was coming. Steve Jobs came, reshuffled the entire industry and took us all to Cloud 9. It may be all about software this year, but Apple has once again ingeniously changed the rules of interaction between everyone and everything else on the planet over the coming decade. I'm sure every tech geek worth his salt must have by now, scanned every word of tech news available online and offline to understand exactly what Jobs meant when he said; “It just works”.
But before we start analyzing, allow me to mention something about ‘the man’ himself. When Steve took the stage he was greeted by a round of applause, standing ovation, and shouts like “We love you, Steve”. That was actually usual. But what was different was his energy levels and restricted stage movements. It is no secret that he’s suffering and this time he clearly looked thinner and gaunter. Sad.

Well, what’s my take on this year’s keynote? To begin with my predictions were right! This year’s show was about refreshing the 10-year old Mac OS with the sprit of recently evolved iOS; moving from local content to cloud content and making iOS devices standalone and self operated hardware by cutting the wire.

Lion: The King of the OS

First let me talk about the Mac OS X Lion. Although, previewed last October, this year’s official launch had enough evidence that showed a perfect marriage between the desktop version of the OS and mobile version of the OS.  And, Lion isn’t just a mere upgrade like its predecessors (Leopard to Snow Leopard), but it comes with over 250 brand new features.

Schiller and Federighi demonstrated the top 10 features of Lion like Multitouch gestures, Fullscreen applications, Mission Control, The Mac App Store, LaunchPad, Resume, Auto Save, Versions(what is this??), AirDrop, and finally Mail. With such ammo in their kitty we know the company is openly firing shots at rivals Google and Microsoft.


According to Apple’s press release, Mission Control combines Exposé, full screen apps, Dashboard and Spaces into one unified experience for a bird’s eye view of every app and window running on your Mac. With a simple swipe, your desktop zooms out to display your open windows, grouped by app, thumbnails of your full screen apps and your Dashboard, and allows you to instantly navigate anywhere with a tap. Have you heard this somewhere before? Well, it’s a combination of the current iOS and recently announced Windows 8. Priced at $29.99 with a July 2011 release, OS X just got very competitive with Windows 8.

Lion will not only eat up Microsoft but will also take a swipe at Google’s domination of its cloud products. OS X’s e-mail client has got a full makeover in Lion, adding new features like three-column view, a conversation view, message previews in the message list, search suggestions, color-coded threads, and multiple flags. Now combine this new Mail with iCloud, the other major announcement at WWDC, and what you get is a mirror image of Google’s offering. And unlike the soon-to-be-defunct MobileMe, iCloud is au-gratis.

Another cool feature that I really liked is the Gestures. Yes, it’s already there in Snow Leopard. But Lion, hugely inspired by its younger sibling iOS, lets you interact directly with content on the screen in a more intuitive way to use your Mac. New gestures include momentum scrolling, tapping or pinching your fingers to zoom in on a web page or image, and swiping left or right to turn a page or switch between full screen apps.  And trust me, when I saw the demo it felt like I was using an iPad instead of the trackpad. 

According to me it feels like it’s Apple vs. World. But hang on. I haven’t said Apple has invented these features but none of these features have been bundled and offered so attractively by a Silicon Valley company before.

And significantly, this 4GB Lion bundle will only be available to download from the Mac App Store and not from the online, Apple Stores, AAD or APR.

Numbers Game:

 

  • There are 54 million Mac users worldwide and counting
  • PCs have shrank 1% and Macs have gone up 28%
  • Almost 3/4ths of Mac sales today are notebooks
  • Mac App Store beat out Best Buy, Walmart and Office Depot as top channel for buying PC software
  • 3000 New APIs for Developers

 

Stay tuned for more on the WWDC coverage on Tecknoholik

5 iPhone Apps for Baba Ramdev

Baba Ramdev is a very busy, angry man and it seems he's not one of those 'holy people' that like to 'get by with the help of his friends'. From trying to build armies to fight corruption, to curing cancer with yoga and recriminalizing homosexuality, Mr. Ramdevji quite literally has his dhoti full. However, thanks to a certain Mr. Jobs-ji, Baba Ramdev can achieve Nirvana ahead of schedule.

Best Of E3

E3

E3 2011 was a bummer. Bigwigs like Microsoft and Sony still concentrated on the Xbox360 and 3D respectively sidelining new games in the process. Apart from maybe Far Cry 3 and Halo 4, which were sequels there were no new IPs announced. But every cloud has a silver lining and here’s what we managed to salvage from E3 2011.

Wii U

Thursday, June 23

Hands-On with the LG Optimus 3D

Optimus 3D

The availability of 3D content is a big issue at the moment so the justification for purchasing a 3D device is, simply put, a way to future proof yourself. Content is however, on an express train to Delivery-town so the wait is not going to be too long. Thus 3D fans will be happy to know that LG’s Optimus 3D smartphone is on its way and should be here in just a couple of months. However, at a recent press conference showcasing LG’s latest line of Smart 3D TVs, I got an opportunity to check out the handset that also happened to be part of their experience zone. Here are my first impressions.

Nokia Announces the C2-02, C2-03 and C2-06 Feature Phones

Only recently the C2-06 had made appearances in leaked images. Not long after that it looks like Nokia has finally decided to announce the C2-06, but along with two more mobile phones called the C2-02 and the C2-03.

The C2-03's features make it a decent Touch and Type handset

 

The C2-03 will be categorized under Nokia’s Touch and Type mobile phones category and will be the first to feature Dual-SIM support. The good thing is that users can change SIM cards easily, thanks to the hot swap feature on the C2-03. Plus, it can remember settings for up to 5 SIM Cards. The phone will be running on Symbian’s Series 40 platform and it has the following specifications:

2.2-inch touchscreen with 240 x 320 pixels resolution
EDGE/GPRS
Bluetooth
2 megapixel camera
Memory expandable to 32 GB
Stereo FM Radio

The phone will also have a brand new version of Nokia Maps with a feature that allows users to search for locations even when offline, which means less data consumption and less charges to the user. The C2-03 will be priced at €77 (approx Rs. 5,000), which looks quite decent and should hit India in the third quarter of 2011.

The C2-06 is similar to the C2-03 but with more colour options

The C2-02 and the C2-06 have specifications that are pretty much the same as the C2-03. The only difference being that the C2-02 supports only one SIM card whereas the C2-06 will come in a wide variety of colours.

A Visual Tribute :: Top 10 Techies Who Changed The World

Steve Jobs :: Apple

Steve Jobs, Apple – Maverick entrepreneur and co-founder of Apple, Steve Jobs is the current grandmaster of technology. Business savvy and a risk taker, Jobs is the visionary who redefined technology with  world changing products like the Personal Computer, iPod, iPhone and iPad.

Bill Gates :: Microsoft

Bill Gates, Microsoft – The Microsoft founder has passed the legion of supergeeks into the pantheon of technological demi-gods. The richest man in the world from 1995 to 2007 is currently the second richest. He holds 8 percent of Microsoft stock and now functions as the non-executive chairman of the company. Over the years, Gates and wife Melinda have made philanthropy their primary concern and recently pledged to give away at least half their fortune to charity with time.

Mark Zucerberg :: Facebook

Mark Zuckerberg, Facebook – Whizkid Zuckerberg almost single handedly transformed the Internet from a place people went to get information to a place they went to meet each other. Facebook gave the virtual world a patina of humanity, the real world a new medium of interpersonal relationships,  and made Zuckerberg not only this generation's phenomenon, but also the second youngest billionaire in the world. Interesting fact: The youngest billionaire is Dustin Moskovitz – co-founder of Facebook and 8 days younger than Zuckerberg, his Harvard roommate

Linus Torvalds :: Linux Kernel

Linus Torvalds, Linux  – This Finnish engineer is virtually unknown outside the inner circles of technology, yet he is among the most influential figures in software development. A believer in open source software, Torvalds initiated thedevelopment of the Linux Kernel. He now acts as the coordinator of the project. The Linux operating system runs the 10 fastest supercomputers in the world and a diverse range of hardware including the smallest of devices. A modified version of the Linux kernel powers the ubiqitous Android OS

Larry Page & Sergey Brin :: Google

Larry Page and Sergey Brin, Google – Co-founders of internet behemoth Google, Larry Page and Sergey Brin ran Google from a rented garage in 1998. Twelve years later, Google has left it's Silicon Valley startup past way behind to become the world's largest media corporation.

Evan Williams :: Twitter

Evan Williams, Twitter & Blogger – Virtually unknown in the real world, this college drop-out created two key communication technologies that shaped the Internet – Blogger and Twitter. He no longer works at Twitter but he's left an indelible handprint on the cyberworld.

Shigeru Miyamoto  :: Nintendo

Shigeru Miyamoto, Nintendo – Even if you've never played a video game, chances are you've heard of Super Mario Bros. Shigeru Miyamoto is the Japanese game designer behind popular Nintendo titles like Legend of Zelda, Donkey Kong, Star Fox, and the grand old man of gaming, Mario.

Jeff Bezos :: Amazon

Jeffrey Bezos, Amazon – In 1994, this Princeton graduate started Amazon.com from his garage in Seattle and changed the face of online retail forever. He began with selling books online but soon diversified into, well, almost everything. Amazon made him a billionaire as well as Time magazine's person of the year in 1999.

Tim Berners Lee :: WWW

Tim Berners-Lee, the World Wide Web – 20 years ago British physicist and computer scientist Berners-Lee invented the World Wide Web, the first web browser and the first web server. This man is the reason we can access webpages and surf the Internet using browsers today. (Photo: AP)

Akio Morita :: Sony

Akio Morita, Sony – Former naval officer Akio Morita left his family business of sake, miso and soy sauce to co-found Sony Corporation in 1946. Most of Sony's path-breaking products like magnetic tapes, tape recorders, pocket-sized radios, the Walkman and the Discman were developed under his leadership. (Photo: AP)

Stay Tuned For More Tech Updates :: By :: Rohit a.k.a. rkgudboy

 

Good News For Nokia Owners : Come July, Nokia to Ship Symbian Anna Handsets

At the ongoing Nokia Connection event in Singapore, CEO Stephen Elop has announced that the N8, C7, C6-01 and E7 will come with Symbian Anna in July. For all the existing users of the above phones, you’ll be able to download the update by the end of August through your PC or OTA. 

A whole new look

Anna is the first major update for Symbian ^3 operating system and brings with a host of improvements right from a new set of icons, faster web browser to improved text input and better maps. A big change comes in the form of a slit screen view while typing in landscape mode so you can see your message thread. Ovi Maps now features a quicker search, new public transportation routes,etc. Business users can now IM with Microsoft Communicator Mobile and new security features like hardware accelerated encryption. Last but not the least, Nokia has confirmed that they will be launching 10 new Symbian smartphones in the next 12 months.

Sony Ericsson Brings the Xperia Ray and Xperia Active

Two Android-based smartphones from Sony Ericsson’s stables will hit the market soon. Called the Xperia Ray and the Xperia Active, both smartphones boast of some really good features and specifications.

 

 

 

 

 

 

 

 

 

 

 

 

The Xperia Ray is powered by a 1 GHz processor, and if you look closely at the picture, you’ll remember that we had seen this handset a few days back called the ST18i. Yes, this is the same handset and we finally have the official specifications. The smartphone will be running on Android Gingerbread 2.3.x with the TimeScape UI on top and here’s what the Xperia Ray boasts of:

 

  • 3.3-inch Capacitive touchscreen with a BRAVIA screen and 854 x 480 pixels resolution
  • 3G, GPS, Wi-Fi
  • EDGE/GPRS
  • Bluetooth 2.1
  • 8 megapixel camera with autofocus and backlit Exmor R sensor
  • Secondary camera
  • Memory expandable to 32 GB
  • 3.5 mm audio jack


The Xperia Ray’s camera will be able to capture videos at 720p resolution and the smartphone will be available in four colours – black, white, gold and pink. The handset is expected to ship from the third quarter of this year, but there’s no mention on the pricing.

Xperia Active

 

 

 

 

 

 

 

 

 

 

 

 

The Xperia Active is targeted (very obviously) towards sports users and boasts of features that are meant specially for those leading an active lifestyle. The Xperia Active will also be running on Android 2.3.x with TimeScape UI and this smartphone will also be powered by a Snapdragon processor clocking 1 GHz. The touchscreen is scratch resistant and has wet finger tracking support. So, now you can touch the screen with your wet fingers and your commands will still be registered. It has the following specifications:

 

  • 3-inch capacitive touchscreen with a resolution of 480 x 320 pixels
  • 3G, GPS with A-GPS support, Wi-Fi, DLNA
  • EDGE/GPRS
  • Bluetooth 2.1
  • 5 megapixel camera with LED flash
  • Stereo FM Radio with RDS
  • 3.5 mm audio jack
  • Memory expandable to 32 GB


Apart from these specifications, the Xperia Active also has pre-installed sports apps with ANT+ technology for monitoring the heart rate in real time. Even the Xperia Active will be available in Q3 of 2011, and we’re still waiting for the pricing of this device, as well.

Tuesday, June 21

:: C++ :: Beginners Guide To All A2 Beginners

 

The C++ Programming Language, written by its architect, is the seminal book on the language.C++ is a statically typedfree-formmulti-paradigmcompiled, general-purpose programming language. It is regarded as anintermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrupstarting in 1979 at Bell Labs as an enhancement to the C language and originally named C with Classes. It was renamed C++ in 1983.

C++ is one of the most popular programming languages and its application domains include systems software (such as Microsoft Windows), application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU ProjectMicrosoftIntel and Embarcadero Technologies. C++ has greatly influenced many other popular programming languages, most notably C# and Java.

C++ is also used for hardware design, where the design is initially described in C++, then analyzed, architecturally constrained, and scheduled to create aregister-transfer level hardware description language via high-level synthesis.

The language began as enhancements to C, first adding classes, then virtual functionsoperator overloadingmultiple inheritancetemplates, andexception handling among other features. After years of development, the C++ programming language standard was ratified in 1998 as ISO/IEC 14882:1998. That standard is still current, but is amended by the 2003 technical corrigendumISO/IEC 14882:2003. The next standard version (known informally as C++0x, in reference to the long-standing expectation that it would be released sometime before 2010) is in development; its final draft was approved on March 25, 2011 and the formal specification is expected to be published in the summer of 2011.

Bjarne Stroustrup, creator of C++ 

History

Bjarne Stroustrup, creator of C++

Bjarne Stroustrup began work on "C with Classes" in 1979. The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. When Stroustrup started working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance theC language with Simula-like features. C was chosen because it was general-purpose, fast, portable and widely used. Besides C and Simula, some other languages that inspired him were ALGOL 68AdaCLU and ML. At first, the class, derived class, strong type checking, inlining, and default argument features were added to C via Stroustrup's C++ to C compiler, Cfront. The first commercial implementation of C++ was released on October 14, 1985.

In 1983, the name of the language was changed from C with Classes to C++ (++ being the increment operator in C). New features were added includingvirtual functions, function name and operator overloading, references, constants, user-controlled free-store memory control, improved type checking, and BCPL style single-line comments with two forward slashes (//). In 1985, the first edition of The C++ Programming Language was released, providing an important reference to the language, since there was not yet an official standard. Release 2.0 of C++ came in 1989 and the updated second edition of The C++ Programming Language was released in 1991. New features included multiple inheritance, abstract classes, static member functions, const member functions, and protected members. In 1990, The Annotated C++ Reference Manual was published. This work became the basis for the future standard. Late addition of features included templatesexceptionsnamespaces, new casts, and a Boolean type.

As the C++ language evolved, the standard library evolved with it. The first addition to the C++ standard library was the stream I/O library which provided facilities to replace the traditional C functions such as printf and scanf. Later, among the most significant additions to the standard library, was large amounts of the Standard Template Library.

 

Etymology

According to Stroustrup: "the name signifies the evolutionary nature of the changes from C". During C++'s development period, the language had been referred to as "new C", then "C with Classes". The final name is credited to Rick Mascitti (mid-1983) and was first used in December 1983. When Mascitti was questioned informally in 1992 about the naming, he indicated that it was given in atongue-in-cheek spirit. It stems from C's "++" operator (which increments the value of a variable) and a common naming convention of using "+" to indicate an enhanced computer program. There is no language called "C plus". ABCL/c+ was the name of an earlier, unrelated programming language.

 

Operators and operator overloading

C++ provides more than 35 operators, covering basic arithmetic, bit manipulation, indirection, comparisons, logical operations and others. Almost all operators can be overloaded for user-defined types, with a few notable exceptions such as member access (. and .*). The rich set of overloadable operators is central to using C++ as a domain-specific language. The overloadable operators are also an essential part of many advanced C++ programming techniques, such as smart pointers. Overloading an operator does not change the precedence of calculations involving the operator, nor does it change the number of operands that the operator uses (any operand may however be ignored by the operator, though it will be evaluated prior to execution). Overloaded "&&" and "||" operators lose their short-circuit evaluation property.


Templates

C++ templates enable generic programming. C++ supports both function and class templates. Templates may be parameterized by types, compile-time constants, and other templates. C++ templates are implemented by instantiation at compile-time. To instantiate a template, compilers substitute specific arguments for a template's parameters to generate a concrete function or class instance. Some substitutions are not possible; these are eliminated by an overload resolution policy described by the phrase "Substitution failure is not an error" (SFINAE). Templates are a powerful tool that can be used for generic programmingtemplate metaprogramming, and code optimization, but this power implies a cost. Template use may increase code size, since each template instantiation produces a copy of the template code: one for each set of template arguments. This is in contrast to run-time generics seen in other languages (e.g. Java) where at compile-time the type is erased and a single template body is preserved.

Templates are different from macros: while both of these compile-time language features enable conditional compilation, templates are not restricted to lexical substitution. Templates are aware of the semantics and type system of their companion language, as well as all compile-time type definitions, and can perform high-level operations including programmatic flow control based on evaluation of strictly type-checked parameters. Macros are capable of conditional control over compilation based on predetermined criteria, but cannot instantiate new types, recurse, or perform type evaluation and in effect are limited to pre-compilation text-substitution and text-inclusion/exclusion. In other words, macros can control compilation flow based on pre-defined symbols but cannot, unlike templates, independently instantiate new symbols. Templates are a tool for static polymorphism (see below) and generic programming.

In addition, templates are a compile time mechanism in C++ that is Turing-complete, meaning that any computation expressible by a computer program can be computed, in some form, by a template metaprogram prior to runtime.

In summary, a template is a compile-time parameterized function or class written without knowledge of the specific arguments used to instantiate it. After instantiation, the resulting code is equivalent to code written specifically for the passed arguments. In this manner, templates provide a way to decouple generic, broadly applicable aspects of functions and classes (encoded in templates) from specific aspects (encoded in template parameters) without sacrificing performance due to abstraction.


Objects

C++ introduces object-oriented programming (OOP) features to C. It offers classes, which provide the four features commonly present in OOP (and some non-OOP) languages: abstraction,encapsulationinheritance, and polymorphism. Objects are instances of classes created at runtime. One distinguishing feature of C++ classes compared to classes in other programming languages is support for deterministic destructors, which in turn provide support for the Resource Allocation is Initialization concept.

[edit]Encapsulation

Encapsulation is the hiding of information in order to ensure that data structures and operators are used as intended and to make the usage model more obvious to the developer. C++ provides the ability to define classes and functions as its primary encapsulation mechanisms. Within a class, members can be declared as either public, protected, or private in order to explicitly enforce encapsulation. A public member of the class is accessible to any function. A private member is accessible only to functions that are members of that class and to functions and classes explicitly granted access permission by the class ("friends"). A protected member is accessible to members of classes that inherit from the class in addition to the class itself and any friends.

The OO principle is that all of the functions (and only the functions) that access the internal representation of a type should be encapsulated within the type definition. C++ supports this (via member functions and friend functions), but does not enforce it: the programmer can declare parts or all of the representation of a type to be public, and is allowed to make public entities that are not part of the representation of the type. Therefore, C++ supports not just OO programming, but other weaker decomposition paradigms, like modular programming.

It is generally considered good practice to make all data private or protected, and to make public only those functions that are part of a minimal interface for users of the class. This hides all the details of data implementation, allowing the designer to later fundamentally change the implementation without changing the interface in any way.

[edit]Inheritance

Inheritance allows one data type to acquire properties of other data types. Inheritance from a base class may be declared as public, protected, or private. This access specifier determines whether unrelated and derived classes can access the inherited public and protected members of the base class. Only public inheritance corresponds to what is usually meant by "inheritance". The other two forms are much less frequently used. If the access specifier is omitted, a "class" inherits privately, while a "struct" inherits publicly. Base classes may be declared as virtual; this is called virtual inheritance. Virtual inheritance ensures that only one instance of a base class exists in the inheritance graph, avoiding some of the ambiguity problems of multiple inheritance.

Multiple inheritance is a C++ feature not found in most other languages, allowing a class to be derived from more than one base classes; this allows for more elaborate inheritance relationships. For example, a "Flying Cat" class can inherit from both "Cat" and "Flying Mammal". Some other languages, such as C# or Java, accomplish something similar (although more limited) by allowing inheritance of multiple interfaces while restricting the number of base classes to one (interfaces, unlike classes, provide only declarations of member functions, no implementation or member data). An interface as in C# and Java can be defined in C++ as a class containing only pure virtual functions, often known as an abstract base class or "ABC". The member functions of such an abstract base class are normally explicitly defined in the derived class, not inherited implicitly.


Polymorphism

Polymorphism enables one common interface for many implementations, and for objects to act differently under different circumstances.

C++ supports several kinds of static (compile-time) and dynamic (run-timepolymorphisms. Compile-time polymorphism does not allow for certain run-time decisions, while run-time polymorphism typically incurs a performance penalty.


Static polymorphism

Function overloading allows programs to declare multiple functions having the same name (but with different arguments). The functions are distinguished by the number or types of their formal parameters. Thus, the same function name can refer to different functions depending on the context in which it is used. The type returned by the function is not used to distinguish overloaded functions and would result in a compile-time error message.

When declaring a function, a programmer can specify for one or more parameters a default value. Doing so allows the parameters with defaults to optionally be omitted when the function is called, in which case the default arguments will be used. When a function is called with fewer arguments than there are declared parameters, explicit arguments are matched to parameters in left-to-right order, with any unmatched parameters at the end of the parameter list being assigned their default arguments. In many cases, specifying default arguments in a single function declaration is preferable to providing overloaded function definitions with different numbers of parameters.

Templates in C++ provide a sophisticated mechanism for writing generic, polymorphic code. In particular, through the Curiously Recurring Template Pattern, it's possible to implement a form of static polymorphism that closely mimics the syntax for overriding virtual functions. Since C++ templates are type-aware and Turing-complete, they can also be used to let the compiler resolve recursive conditionals and generate substantial programs through template metaprogramming. Contrary to some opinion, template code will not generate a bulk code after compilation with the proper compiler settings.


Dynamic polymorphism


Inheritance

Variable pointers (and references) to a base class type in C++ can refer to objects of any derived classes of that type in addition to objects exactly matching the variable type. This allows arrays and other kinds of containers to hold pointers to objects of differing types. Because assignment of values to variables usually occurs at run-time, this is necessarily a run-time phenomenon.

C++ also provides a dynamic_cast operator, which allows the program to safely attempt conversion of an object into an object of a more specific object type (as opposed to conversion to a more general type, which is always allowed). This feature relies on run-time type information (RTTI). Objects known to be of a certain specific type can also be cast to that type with static_cast, a purely compile-time construct that is faster and does not require RTTI.


Virtual member functions

Ordinarily, when a function in a derived class overrides a function in a base class, the function to call is determined by the type of the object. A given function is overridden when there exists no difference in the number or type of parameters between two or more definitions of that function. Hence, at compile time, it may not be possible to determine the type of the object and therefore the correct function to call, given only a base class pointer; the decision is therefore put off until runtime. This is called dynamic dispatchVirtual member functions or methods allow the most specific implementation of the function to be called, according to the actual run-time type of the object. In C++ implementations, this is commonly done using virtual function tables. If the object type is known, this may be bypassed by prepending a fully qualified class name before the function call, but in general calls to virtual functions are resolved at run time.

In addition to standard member functions, operator overloads and destructors can be virtual. A general rule of thumb is that if any functions in the class are virtual, the destructor should be as well. As the type of an object at its creation is known at compile time, constructors, and by extension copy constructors, cannot be virtual. Nonetheless a situation may arise where a copy of an object needs to be created when a pointer to a derived object is passed as a pointer to a base object. In such a case, a common solution is to create a clone() (or similar) virtual function that creates and returns a copy of the derived class when called.

A member function can also be made "pure virtual" by appending it with = 0 after the closing parenthesis and before the semicolon. A class containing a pure virtual function is called an abstract data type. Objects cannot be created from abstract data types; they can only be derived from. Any derived class inherits the virtual function as pure and must provide a non-pure definition of it (and all other pure virtual functions) before objects of the derived class can be created. A program that attempts to create an object of a class with a pure virtual member function or inherited pure virtual member function is ill-formed.

Parsing and processing C++ source code

It is relatively difficult to write a good C++ parser with classic parsing algorithms such as LALR(1). This is partly because the C++ grammar is not LALR. Because of this, there are very few tools for analyzing or performing non-trivial transformations (e.g., refactoring) of existing code. One way to handle this difficulty is to choose a different syntax, such as Significantly Prettier and Easier C++ Syntax, which is LALR(1) parsable. More powerful parsers, such as GLR parsers, can be substantially simpler (though slower).

Parsing (in the literal sense of producing a syntax tree) is not the most difficult problem in building a C++ processing tool. Such tools must also have the same understanding of the meaning of the identifiers in the program as a compiler might have. Practical systems for processing C++ must then not only parse the source text, but be able to resolve for each identifier precisely which definition applies (e.g. they must correctly handle C++'s complex scoping rules) and what its type is, as well as the types of larger expressions.

Finally, a practical C++ processing tool must be able to handle the variety of C++ dialects used in practice (such as that supported by the GNU Compiler Collection and that of Microsoft's Visual C++) and implement appropriate analyzers, source code transformers, and regenerate source text. Combining advanced parsing algorithms such as GLR with symbol table construction and program transformation machinery can enable the construction of arbitrary C++ tools.


Compatibility

Producing a reasonably standards-compliant C++ compiler has proven to be a difficult task for compiler vendors in general. For many years, different C++ compilers implemented the C++ language to different levels of compliance to the standard, and their implementations varied widely in some areas such as partial template specialization. Recent releases of most popular C++ compilers support almost all of the C++ 1998 standard.

In order to give compiler vendors greater freedom, the C++ standards committee decided not to dictate the implementation of name manglingexception handling, and other implementation-specific features. The downside of this decision is that object code produced by different compilers is expected to be incompatible. There were, however, attempts to standardize compilers for particular machines or operating systems (for example C++ ABI), though they seem to be largely abandoned now.


Exported templates

One particular point of contention is the export keyword, intended to allow template definitions to be separated from their declarations. The first widely available compiler to implement export wasComeau C/C++, in early 2003 (five years after the release of the standard); in 2004, the beta compiler of Borland C++ Builder X was also released with export. Both of these compilers are based on the EDG C++ front end. Other compilers such as GCC do not support it at all. Beginning ANSI C++ by Ivor Horton provides example code with the keyword that will not compile in most compilers, without reference to this problem. Herb Sutter, former convener of the C++ standards committee, recommended that export be removed from future versions of the C++ standard. During the March 2010 ISO C++ standards meeting, the C++ standards committee voted to remove exported templates entirely from C++0x, but reserve the keyword for future use.