Recent content by fl0r

View posts by fl0r View threads by fl0r
  1. Template Specialization

    In many cases when working with templates, you'll write one generic version for all possible data types and leave it at that--every vector may be implemented in exactly the same way. The idea of template specialization is to override the default template implementation to handle a particular...
  2. Templated Functions

    C++ templates can be used both for classes and for functions in C++. Templated functions are actually a bit easier to use than templated classes, as the compiler can often deduce the desired type from the function's argument list. The syntax for declaring a templated function is similar to...
  3. Templates and Template Classes in C++

    What's better than having several classes that do the same thing to different datatypes? One class that lets you choose which datatype it acts on. Templates are a way of making your classes more abstract by letting you define the behavior of the class without actually knowing what datatype will...
  4. Formatting Cout Output in C++ using iomanip

    Creating cleanly formatted output is a common programming requirement--it improves your user interface and makes it easier to read any debugging messages that you might print to the screen. In C, formatted output works via the printf statement, but in C++, you can create nicely formatted output...
  5. Enumerated Types - enums

    Sometimes as programmers we want to express the idea that a variable will be used for a specific purpose and should only be able to have a small number of values--for instance, a variable that stores the current direction of the wind might only need to store values corresponding to north, south...
  6. Do great relationships start out as friendships?

    i really dont think so but i know some of my friends that has started as friendships and ended in relationships :S
  7. Do great relationships start out as friendships?

    i really dont think so but i know some of my friends that has started as friendships and ended in relationships :S
  8. Hii everyone

    Hi my name is Florian Aliaga i come from The Republic of Kosovo im 17 years old.My hoby is Basketball .
  9. Class Design in C++

    Understanding Interfaces When you're designing a class in C++, the first thing you should decide is the public interface for the class. The public interface determines how your class will be used by other programmers (or you), and once designed and implemented it should generally stay pretty...
  10. Understanding Initialization Lists in C++

    Understanding the Start of an Object's Lifetime In C++, whenever an object of a class is created, its constructor is called. But that's not all--its parent class constructor is called, as are the constructors for all objects that belong to the class. By default, the constructors invoked are the...
  11. Lesson 20: Inheritance - Syntax

    Before beginning this lesson, you should have an understanding of the idea of inheritance. If you do not, please read lesson 19. This lesson will consist of an overview of the syntax of inheritance, the use of the keywords public, private, and protected, and then an example program following to...
  12. Lesson 19: Inheritance in C++

    The ability to use the object-oriented programming is an important feature of C++. Lesson 12: classes in C++ introduced the idea of the class; if you have not read it and do not know the basic details of classes, you should read it before continuing this tutorial. Inheritance is an important...
  13. Binary Trees in C++: Part 1

    The binary tree is a fundamental data structure used in computer science. The binary tree is a useful data structure for rapidly storing sorted data and rapidly retrieving stored data. A binary tree is composed of parent nodes, or leaves, each of which stores data and also links to up to two...
  14. Binary Trees in C++: Part 1

    The binary tree is a fundamental data structure used in computer science. The binary tree is a useful data structure for rapidly storing sorted data and rapidly retrieving stored data. A binary tree is composed of parent nodes, or leaves, each of which stores data and also links to up to two...
  15. Lesson 17: Functions with Variable Argument Lists in C and C++ using va_list

    Perhaps you would like to have a function that will accept any number of values and then return the average. You don't know how many arguments will be passed in to the function. One way you could make the function would be to accept a pointer to an array. Another way would be to write a function...
Back
Top