C++

C++ & Lua - Function Arguments


Posted in:

As we have been realizing here at SOTC, using Lua with C++ is really the only way to make Lua work for you. Lua itself is really not that useful, but used in conjunction with other languages, it can be quite powerful. It past tutorials, we have gone over how to use Lua with C++. However, we have yet to go over how to pass arguments back and forth between the two. This is what we will cover today.

Read More Icon Read More

C++ & Lua - Functions


Posted in:

So in our last Lua tutorial, we went over a basic way to get information from lua and use it inside C++ code. This time, we are going to use the same principals to run a lua function from C++ and a C++ function from lua. This opens up endless possibilities for communication between the two. So, how about we get started then.

Read More Icon Read More

Lua & C++ - The Basics


Posted in:

With Lua, almost anything is possible. It is akin to JS, but in some ways it is so much more powerful. With World of Warcraft incorporating Lua right into its core, you have to wonder how powerful you can actually make it. One of the things that make Lua so powerful is its easy integration into C++ and C. With this integration, you can accomplish just about anything. Today, we are going to go through the steps to get some basic interaction between C++ and Lua.

Read More Icon Read More

Implementing C# Interfaces in C++


Posted in:

New technologies are always replacing existing ones. A common transition right now is from C++ to C#. Microsoft helped this transition greatly by creating the managed extensions to C++, which essentially gives us access to all things .NET.

Interfaces are not a language feature of native C++. There are several mechanisms for replicating the functionality, but it's not built in. Interfaces in C#, however, are ingrained directly in the language and are a important construct for any reasonably complicated architecture.

Read More Icon Read More

C++ Tutorial - Sorting STL Containers


Posted in:

Welcome to the first C++ tutorial ever written for Switch On The Code. Our tutorials are typically centered around C# and Flex, however lots of people in the world (including me) program in C++ every day - and the standard template library is an integral part of any modern C++ project. This tutorial is going to demonstrate how to use the built-in algorithms to perform custom sorting on standard template library collections.

Read More Icon Read More

How Google Chrome Stores Passwords


Posted in:

Every browser released in the last decade has some sort of password management system, and Google Chrome is no different. I've been sifting through the Chrome source code, released under the open source project Chromium, and I've found out how they do it. In this tutorial, I'll post all of the source code used by Google Chrome to quickly and securely save your passwords.

Read More Icon Read More

Sponsors