Iterating a C++ std::list

Set up a list to store pointers to a “Points” class…

list<Point*> m_pointList;

Add to the list…

Point* p = new Point(x, y);

Then iterate the list using this…

std::list<Point*>::iterator it = m_pointList.begin();
while (it != m_pointList.end())
    Point* p = *it;

    // do something with the Point here!


…or, if you’d prefer a for loop…

for(std::list<Point*>::iterator it = m_pointList.begin(); it != m_pointList.end(); ++it)
    Point* p = *it;
    // do something with the Point here!


Installing CUDA

Here’s the process for installing CUDA. I’m installing version 11.4 update 2, but the process has been the same for a while now.

  1. Go to the CUDA SDK download page here

2. Select the OS. As you select content, more buttons will appear to narrow the download content so it’s specific to your device. When prompted, I use a network install. This will download a small stub and then pull additional content as it’s needed. For Windows 10 64bit, I ended up with this display…

3. Download the installer and run it. It will ask for a temp directory to store content in. I go with the default: –

4. If you’re happy with it, then accept the licensing agreement

5. Select Express install. This puts all of the core features in

6. Wait for the content to download…

7. Wait for the Install to complete…

8. When complete, the installation will show the components installed so you know what’s been done.

9. Click “Close” and the install is complete

That’s the lot. Hope it helps!

Adding a Display Capture to OBS

I recently did a quick overview of how to install OBS here. The process to add display capture is as follows: –

  1. Click the “+” button in the “Sources” area

2. Select “Display Capture” in the list that pops up

3. Under “Create new” accept the default or name your display as you’d like and then click “OK”

4. Select the display you’d like to use and click “OK”

…and that’s it. If you’d like to add a webcam then take a look here.

Hope it helps!

Adding a webcam to OBS

I did a quick overview of how to install OBS here. If you’d like to add a webcam to that install then here’s how you do it…

  1. Click on the “+” in the “Sources” area.

2. Select “Video Capture Device”

3. In the “Create new” textbox enter “Webcam” (or whatever you want to call it) and click “OK”

4. Select the Webcam or capture device you want to use and press the “OK” button. In my case my webcam showed up as “USB Video Device”

5. The webcam will now show in the main view. You can drag and re-size it if required.

That’s the lot. Hope it helped!

Installing OBS

OBS is a handy piece of software for capturing and streaming video. I use it when I’m doing tutorials for work but I’m also going to start pushing “How To” videos so I thought I’d do a quick overview of the set-up process.

  1. First, go to and download the installer that works for your set-up. I’m using Windows 10 64bit for this example
  2. Run the installer and you’ll see the screenshot below. Hit “Next”

3. Accept the license information by pressing “Next” (if you’re happy with it that is)

4. Set the install location or leave it as default and click “Install”. Files will install to the selected location.

5. Click “Finish” to complete the install when you see the screen below.

6. When the app starts, select the type of activity you’ll be doing (streaming or recording). I set to “Recording” and then upload to YouTube later. Once you’ve made your choice, click “Next

7. I record from a specific monitor (selected in the pulldown in the screen below). I use the center monitor of the three I have and then put OBS on the right monitor so I can start/stop recording and change settings while recording as needed.

8. OBS will figure out the best set-up for you and then show you the settings. In my case the monitor I’m recoding from the UHD so it’ll auto-scale down to 1920×1080 to avoid too much bandwidth use.

…and that’s it. When you hit “Apply Settings” it’ll start the software and you’re ready to go.

If you’d like to add a webcam then take a look here for more info

If you’d like to add a display capture then take a look here for more info