Today we’ll be looking at control statements in C++. We’ll start by looking at conditionals. Obviously, we have access to the same conditionals that are in C. This includes: If Else Else-if Switch And these can be implemented in the same way. This is shown below: These can be used to control the flow ofContinue reading “C++ Lesson 5 – Control Statements”
Tag Archives: C language
C++ Lesson 4 – Header Files
Today we’re going to be making header files in C++. Visual Studio makes this very easy to do and in fact, if you’ve watch the C series, you’ll probably already now how to do this. To start, in Visual Studio, we’ll want to create the header file: In here, we’re going to declare the functions,Continue reading “C++ Lesson 4 – Header Files”
R Lesson 5 – Mathematical Functions
Today we’ll be looking at writing some functions in R, with the goal being to create functions that can perform mathematical equations. For example we can make a function f(x) that takes an input and returns some output value: With that in mind, you can then plot the function: So you see that it isContinue reading “R Lesson 5 – Mathematical Functions”
Python Lesson 5 – Plotting
The last thing we’re going to cover in this series is data visualization in Python. Today we’ll be taking a look at some of the graphing tools available in Python. When it comes to visualizing data in Python, there are two main libraries that you’ll be using; Matplotlib and Seaborn. There are advantages and disadvantagesContinue reading “Python Lesson 5 – Plotting”
C++ Lesson 3 – Writing Functions
Now we’re going to take a look at function writing in C++. It works exactly the same as writing functions in C. We can either declare at the start of the file and define later. Order is important for the compiler, it needs to at least know the function exists before it is used withinContinue reading “C++ Lesson 3 – Writing Functions”
C++ Lesson 2 – Variables
Today we’ll be looking at variables, this includes primitive data types as well as some useful objects available in C++. We have access to the same data types we do in C, those being: -int-double-float-bool-char Which can be declared as so: In addition to these, C++ gives us access to a multitude of objects thatContinue reading “C++ Lesson 2 – Variables”
R Lesson 4 – Plotting
Today we’ll be looking at visualising data in R. A line graph can be made as so: A histogram can be made like so: A boxplot can be made like so: A scatter plot can be made like so: There are so many different plotting libraries and functions, the only real way to get whatContinue reading “R Lesson 4 – Plotting”
Python Lesson 4 – Functional Programming
Today we’re going to be looking at functional programming in Python. To start with, we’ll look at mathematical functions. These are in the form of f(x), which will only have one value. That means that for any given x, f(x) is always the same. However, multiple x can have the same f(x). It is importantContinue reading “Python Lesson 4 – Functional Programming”
C++ Lesson 1 – Hello World
Now that we’re all set up and ready to do some actual coding. For this we’ll be doing the classic “Hello World!” example. To begin with, create your project. You’ll notice that when you create the the project it will come with the “Hello World!” already created. So lets walk through what is going on.Continue reading “C++ Lesson 1 – Hello World”
Getting Started – C++
Today we’re going to be getting started with C++. If you’ve been through the C tutorial available on the blog, you’ll already be set up with everything you need. For the sake of any newcomers to the blog, we’ll be covering how to get started with C++. Firstly, we’ll need an IDE to make ourContinue reading “Getting Started – C++”