How to use a template to create a custom collection class and using the C++ std::vector STL library as well as the operator. I will expect you to understand how pointers, classes, templates and the operator works Introduction C++ comes with its own set of containers in the STL (Standard Template Libraries) libraries; (e.g. std::vector). It […]
Zoom div by percentage using CSS
This little example mark-up shows you how to zoom in a div by a specific percentage using only CSS.
Introducing the ‘for’ loop
A really small tutorial introducing the ‘for’ loop, good for C++ newbies and programming beginners. In this tutorial I expect you to have a little knowledge about programming, but to understand at least the C++ variables and other basic information. Like in any other programming language, loops are very useful for repeating tasks. For is […]
Disable The Firebug Plugin
Using JavaScript, you can disable the Firebug Firefox plugin to prevent others from debugging your code. This JavaScript code snippet is designed to ensure that the console object exists in the browser environment, even in browsers where it might not be natively supported or if certain tools like Firebug are not present. Here’s a breakdown: […]
Size of Structures
In this programming tutorial we will see that 2 structures with the same elements but with different arrange of elements make a different size of structure. Look at these structures:struct st1{ bool b1; int i1; char c1; bool b2; int i2;}; struct st2{ bool b1; bool b2; char c1; int i1; int i2;}; st1 works the same as st2 in C/C++, but the size of these structures isdifferent, because of the size of the data packing. Look […]
Outline All CSS Elements
These few lines lines of CSS will outline every element with a border, up to 8 levels. Add more lines if your CSS elements go into a higher depth.
Dissecting ‘Hello World’ in C++ .NET
The purpose of this tutorial is to give you an idea of the differences between C++ and C++ .NET. It is suitable for those who want to migrate from C++ to C++ .NET but also for those with no prior experience in programming. This tutorial is written with two types of readers in mind. The […]
Show Link Icons Depending On File Extension
Possible since CSS version 2.1, the anchor element can be referred to depending on the last few characters of the href attribute, hence links with different extensions can have different styles.
Trim Leading And Trailing Spaces
Trim the whitespaces at the beginning and end of a string using while loops instead of regular expressions.
Using header files in C++ .NET
This tutorial will show you how to work with C++ .NET headers (or includes). How to create a header file with a class in it, include the file in a typical .cpp file, set a variable and call a public function, both defined inside the header. So let’s see how it’s done. Create a new C++ […]