PART 1: Getting Started

Similar documents
Customizing DAZ Studio

COPYRIGHTED MATERIAL. Starting Strong with Visual C# 2005 Express Edition

1) Log on to the computer using your PU net ID and password.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

Lab 2 Building on Linux

Visual C++ Tutorial. For Introduction to Programming with C++ By Y. Daniel Liang

Using the Zoo Workstations

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

Opening Microsoft Visual Studio. On Microsoft Windows Vista and XP to open the visual studio do the following:

Laboratory 1: Eclipse and Karel the Robot

Writing to and reading from files

Subversion was not there a minute ago. Then I went through a couple of menus and eventually it showed up. Why is it there sometimes and sometimes not?

Clickteam Fusion 2.5 Creating a Debug System - Guide

Your First Windows Form

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

Tutorial - Exporting Models to Simulink

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

UV Mapping to avoid texture flaws and enable proper shading

To get started with Visual Basic 2005, I recommend that you jump right in

Summer Assignment for AP Computer Science. Room 302

ECE QNX Real-time Lab


Interface. 2. Interface Adobe InDesign CS2 H O T

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Microsoft Expression Web Quickstart Guide

Taskbar: Working with Several Windows at Once

EECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

Warewolf User Guide 1: Introduction and Basic Concepts

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

Java Program Structure and Eclipse. Overview. Eclipse Projects and Project Structure. COMP 210: Object-Oriented Programming Lecture Notes 1

Premium POS Pizza Order Entry Module. Introduction and Tutorial

Installing VS Code. Instructions for the Window OS.

Word: Print Address Labels Using Mail Merge

You re most likely eager to get started programming in C. I shan t waste

Formatting Page Numbers for your Thesis/ Dissertation Using Microsoft Word 2013

1 Installation (briefly)

Lutheran High North Technology The Finder

MS Visual Studio.Net 2008 Tutorial

ORGANISING MESSAGES. In this session you will: FOCUS

Microsoft Expression Web is usually obtained as a program within Microsoft Expression Studio. This tutorial deals specifically with Versions 3 and 4,

In the first class, you'll learn how to create a simple single-view app, following a 3-step process:

My First Command-Line Program

XP: Backup Your Important Files for Safety

C Pointers 2013 Author Riko H i

How to approach a computational problem

Lab Android Development Environment

Carleton University Department of Systems and Computer Engineering SYSC Foundations of Imperative Programming - Winter 2012

Cmpt 101 Lab 1 - Outline

Let s Make a Front Panel using FrontCAD

Page design and working with frames

How to build Simbody 2.2 from source on Windows

CSCU9B2 Practical 1: Introduction to HTML 5

Developing for Mobile Devices Lab (Part 1 of 2)

The purpose of this tutorial is to introduce you to the Construct 2 program. First, you will be told where the software is located on the computer

Click on the Start Icon. Click on All Programs

Practical 2: Ray Tracing

Newforma Contact Directory Quick Reference Guide

Chris' Makefile Tutorial

Copyright 2018 MakeUseOf. All Rights Reserved.

A Tutorial on using Code::Blocks with Catalina 3.0.3

Setting up a Project and Debugging with Visual Studio

TI-83+ Z80 ASM for the Absolute Beginner

John W. Jacobs Technology Center 450 Exton Square Parkway Exton, PA Introduction to

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

QUICK EXCEL TUTORIAL. The Very Basics

Access 2007, the most recent version of Microsoft Office s database application,

ONLINE CLASSROOM

Tutorial: Modify UI 01 How to Load a UI Canvas Using Flow Graph

Practicum 5 Maps and Closures

Intro. Scheme Basics. scm> 5 5. scm>

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

Introduction. Headers and Footers. Word 2010 Working with Headers and Footers. To Insert a Header or Footer: Page 1

(Refer Slide Time: 1:12)

Microsoft SharePoint 2010

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #47. File Handling

Lab 9: Pointers and arrays

Code::Blocks Student Manual

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010

Install Visual Studio Community Version 2017

Eclipse Environment Setup

Textures and UV Mapping in Blender

Using Karel with Eclipse

Creating A Visible Instructions Page In ICS

Tech Shorts SM # Let s Tackle Headers Head-On!

MFC One Step At A Time By: Brandon Fogerty

It s possible to get your inbox to zero and keep it there, even if you get hundreds of s a day.

Introduction to Programming

Exercise 6 - Addressing a Message

Dreamweaver Basics Workshop

Creating an with Constant Contact. A step-by-step guide

Part 1: Understanding Windows XP Basics

Saleae Device SDK Starting a Device SDK Project on Windows Starting a Device SDK Project on Linux... 7

WordPress Tutorial for Beginners with Step by Step PDF by Stratosphere Digital

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder.

Adobe Dreamweaver CS5 Tutorial

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

Part 1 - Your First algorithm

Essbase Installation Tutorial Tim Tow, President and Oracle ACE Director. Applied OLAP, Inc

Transcription:

Programming in C++ / FASTTRACK TUTORIALS Introduction PART 1: Getting Started Welcome to the first article in the C++ FASTTRACK tutorial series! These tutorials are designed to take you from zero to a decent entry level in a somewhat smooth fashion. We start at the absolute basics: all that you need to get started is a laptop or PC, a fair bit of time, and quite a bit of dedication. Regarding dedication: These tutorials are supposed to take you anywhere between two and four hours each. You are supposed to complete two tutorials per week, in order to meet the deadline (the end of the block). That means that you have an extra workload of 4-8 hours. No-one said this was going to be easy, right? If you need support while going through these articles, head to http://dgdarc.slack.com. You ll have no problems getting answers to your newbie questions there. Lecturers and experienced programmers also roam this channel. About the authors This course was originally created for the IGAD program of the NHTV University of Applied Sciences in Breda; see http://made.nhtv.nl. It was recently updated for the students of the Utrecht University; see https://www.uu.nl/en/organisation/faculty-of-science/education/bachelors-programmes. This tutorial was written by Jacco Bikker, Brian Beuken, Nils Deslé, and Carlos Bott and updated for Visual Studio 2015 by Jacco Bikker. Getting the stuff you need For the purpose of this course, I will assume you develop your games on PCs. The preferred development environment is Microsoft s Visual Studio 2015. A free version of this software is available from Microsoft, via https://www.visualstudio.com/downloads. Checklist: A PC or laptop, pretty much any CPU and GPU will do Windows 7 (with SP1), 8 or 10, 32-bit or 64-bit Visual Studio 2015 Community Edition, installed with default settings

Starting Visual Studio 2015 When you start Visual Studio 2015 for the first time you are greeted with this window: Selecting not now, maybe later is luckily a perfectly viable option, so let s go for that (no need to leave any more personal information with a tech giant than strictly necessary, right?). In the next window, you get to choose a theme. As the window says, you can always change this later, so let s go with dark. Now we finally get into the IDE (which stands for integrated development environment ):

As you can see, there is a lot of stuff on the screen. Let s make some room: Close the start page. Click on Server Explorer, then close it to get rid of it. Do the same to Toolbox. Drag the Solution Explorer to the left of the screen. In the main menu, click on View, go to Toolbars, and disable standard. You now have something like this: I often see people work on the area of a stamp (not just when programming) due to all the toolbars: this layout prevents that. We didn t remove anything that we need (apart from one thing), and we assumed control of the software in the process. The one thing we are missing is two drop-down boxes (OK, so two things). We can store these next to the menu bar, so they don t need their own toolbar. Do this: click on Tools, then Customize, and select the Commands tab. Now click on Add Command, select the Build category, and choose the Solution Configurations command. This adds the dropdown box to the left of your menu bar; click the Move Down button a few times, until it is all the way to the right. Repeat this for the Solution Platforms command. The top of the screen now looks like this: And that is as tidy as it gets for now.

Creating a program Before we go on: This is the first and only article in these series that is this boring. Starting with part 2, you will be coding, not downloading + installing + adjusting settings. Promise. That being said, let s get coding! From the File menu, select New, then Project: You need to change various things in this dialog. Set the name of your project to test (or use your imagination). Set the location to c:\my_projects (so you can actually find your files). Unselect create directory for solution. It will create enough directories anyway. Finally, make sure you selected Win32 and Win32 Console Application. Then click OK. In the next window, click Next (not Finish). In the next window, tell VS that you want an empty project, without any ATL, MFC or SDL stuff. Now click Finish. Your solution (you didn t solve anything, but whatever) should look like the image on the right now. Now, let s delete some things we don t need: Select all three folders (Header files, Resource files and Source files you can t delete external dependencies ) and delete them. You can also kill the properties panel that may have appeared. Now it s finally time to add a source file to play with. Right-click on test and select Add New Item. In the dialog, select C++ File (.cpp), and name it main.cpp (or anything else really, as long as it ends with.cpp). Then click Add. The new file is immediately opened, and we re ready for some coding.

Hello world A tutorial on C++ is not complete without a hello world example, so here we go. Enter the following program: #include "stdio.h" void main() { printf( "Hello world!\n" ); getchar(); } You can start the program by hitting F5. Visual Studio will ask you if you want to build the program; you want this so click yes. Discussion When you go to c:\my_projects\test, you will see that Visual Studio created a large amount of files for you. The most interesting one is in the Debug folder, and it s called test.exe. When you start this application, you will see that you created it yourself. Apart from this file, we have: test.sln: your solution file, which points to test.vcxproj: your project file, which points to main.cpp: the source file. A project can have multiple source files, and a solution can have multiple projects. Other files: test.vcxproj.filters: stores the folders in your project; test.vc.db and opendb: some internal information; various files in the Debug folder:.obj,.ilk,.pdb. Quite confusing perhaps, but all that matters right now is the.cpp file in c:\my_projects\test and the executable that it was turned into. Quick advice: perhaps your explorer window does not show file extensions (.sln,.db,, as in the above screenshot). Fix this, you need this info. This is done in the windows control panel: go to Folder Options, then the View tab, and disable Hide extensions for known file types.

Assignment Every article in this series will end with a small practical assignment. You need to complete this assignment, and send the result to one of the programming teachers. Once you have done so, you may continue with the next part. So, here s your task: Create an executable that prints your name 10 times, then waits for a key, then prints Coding is awesome! 10 times, then waits for a key again, then exits. END OF PART 1 Next part: The PR1 Template