Commit 5ade1223 authored by Rachel Wil Sha Singh's avatar Rachel Wil Sha Singh 💬
Browse files

Summer 2020 content

parent ca9bf893
# From GitHub user content
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
## Get latest from
# User-specific files
# User-specific files (MonoDevelop/Xamarin Studio)
# Mono auto generated files
# Build results
# Visual Studio 2015/2017 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
# NUnit
# Build Results of an ATL Project
# Benchmark Results
# .NET Core
# ASP.NET Scaffolding
# StyleCop
# Files built by Visual Studio
# Chutzpah Test files
# Visual C++ cache files
# Visual Studio profiler
# Visual Studio Trace Files
# TFS 2012 Local Workspace
# Guidance Automation Toolkit
# ReSharper is a .NET coding add-in
# TeamCity is a build add-in
# DotCover is a Code Coverage Tool
# AxoCover is a Code Coverage Tool
# Coverlet is a free, cross platform Code Coverage Tool
# Visual Studio code coverage results
# NCrunch
# MightyMoose
# Web workbench (sass)
# Installshield output folder
# DocProject is a documentation generator add-in
# Click-Once directory
# Publish Web Output
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
# NuGet Packages
# NuGet Symbol Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignorable files
# Microsoft Azure Build Output
# Microsoft Azure Emulator
# Windows Store app package directories and files
# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache
# Others
# Including strong name files can present a security risk
# (
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (
# RIA/Silverlight projects
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
# SQL Server files
# Business Intelligence projects
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
# GhostDoc plugin setting file
# Node.js Tools for Visual Studio
# Visual Studio 6 build log
# Visual Studio 6 workspace options file
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
# Visual Studio LightSwitch build output
# Paket dependency manager
# FAKE - F# Make
# CodeRush personal settings
# Python Tools for Visual Studio (PTVS)
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
# Telerik's JustMock configuration file
# BizTalk build output
# OpenCover UI analysis results
# Azure Stream Analytics local run output
# MSBuild Binary and Structured Log
# NVidia Nsight GPU debugger configuration file
# MFractors (Xamarin productivity tool) working folder
# Local History for Visual Studio
# BeatPulse healthcheck temp database
# Backup folder for Package Reference Convert tool in Visual Studio 2017
# Ionide (cross platform F# VS Code tools) working folder
# Fody - auto-generated XML schema
......@@ -2,4 +2,6 @@
CS 200: Concepts of Programming Algorithms using C++
Course at JCCC
\ No newline at end of file
Course at JCCC
rm *.log *.dvi *.aux
\@writefile{toc}{\contentsline {section}{\numberline {0.1}Using Visual Studio}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.1}Downloading Visual Studio}{4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.2}Installing Visual Studio}{5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.3}Creating a program}{6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.4}Writing a program}{9}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.5}Building and running the program}{10}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.1.6}Locating your source file}{12}}
\@writefile{toc}{\contentsline {section}{\numberline {0.2}Using Code::Blocks}{14}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.1}Downloading Code::Blocks}{14}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.2}Installing Code::Blocks}{15}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.3}Creating a program}{15}}
\@writefile{toc}{\contentsline {paragraph}{Project type selection screen:}{16}}
\@writefile{toc}{\contentsline {paragraph}{Project information screen:}{16}}
\@writefile{toc}{\contentsline {paragraph}{Compiler information screen:}{17}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.4}Writing a program}{20}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.5}Building and running the program}{21}}
\@writefile{toc}{\contentsline {subsection}{\numberline {0.2.6}Locating your source file}{23}}
\newcommand{\laTopic} {Tools setup}
\newcommand{\laTitle} {CS 200 Lab}
\author{Rachel Singh}
\lhead{\laTopic \ / \laTitle}
\rfoot{\tiny \thepage\ of \pageref{LastPage}}
\lfoot{\tiny Rachel Singh, last updated \today}
\section*{Lab instructions}
\item Once you've finished the lab, turn in your \textbf{.cpp} source file in on Canvas.
In Windows, they will be marked as a ``C++ source file'' type.
\item I prefer files to \textbf{not be zipped}, unless otherwise stated.
\item \textbf{Do not} zip an entire project/solution directory. I don't want all the
extra files. One source file is a few bytes; the entire directory will be several
megabytes and take longer to download.
\section*{Setting up your IDE}
\begin{intro}{What is an IDE again?}
An IDE is an Integrated Development Environment.
IDEs contain multiple types of tools that help you
effectively create software in C++, such as a
\textbf{text editor with syntax highlighting},
a \textbf{compiler} to turn source into executables,
and a \textbf{debugger} to help you debug your code.
You can write C++ code on any operating system; C++ is not a product
of a single company (like Microsoft), so there are a lot of options
out there for tools you can use to write C++ in. In general, my suggestions
would be:
\begin{tabular}{l c c c c}
& Windows & Linux & Mac & Slow computer
\\ \hline
Visual Studio & x
Code::Blocks & x & x & x & x
Xcode & & & x
\item \textbf{Visual Studio...}
\item A very common tool, being used
on JCCC computers in the lab, at UMKC, and at lots of
software development companies here in Kansas City.
\item It can also be very bloated and very slow. If your computer
is having trouble running Visual Studio, you might try
Code::Blocks instead.
\item \textbf{Code::Blocks...}
\item Runs on Windows, Linux and Mac.
\item Is lighter-weight than Visual Studio.
\item Has the same debugging tools needed.
\item I've never worked at a company that uses Code::Blocks,
but I prefer it when writing C++ for myself.
\item When downloading on Windows, make sure to get the version
that says \textbf{``mingw-setup.exe''!}
\item \textbf{Xcode...}
\item Runs on Mac.
\item Has the same debugging tools needed.
\item I am not very familiar with it.
\item Also used professionally a lot.
\section{Using Visual Studio}
\subsection{Downloading Visual Studio}
From the Visual Studio Community page, select \textbf{Download Visual Studio}.
Open the installer and it will begin downloading all the files it needs.
This will take a while.
\subsection{Installing Visual Studio}
Once the installer is ready, it will pop up a window with different
toolsets that Visual Studio supports.
Make sure to locate \textbf{``Desktop development with C++''},
then click \textbf{Install}.
It will then take a while to install, and request that you restart your
computer after it's done installing. Go ahead and do that before continuing.
When you first launch Visual Studio, it will ask you to log in with a Microsoft account.
This could be a hotmail account or something. I have a hotmail account that I only
use to log into Visual Studio. You can skip this step, but I am not sure if it makes
you log in later on in the future.
\subsection{Creating a program}
In Visual Studio, we create \textbf{solutions} for a program.
Later on, programs will have multiple source code files, but
for now we will just have one source file.
When Visual Studio is open, there's a splash screen with some
common options. Select \textbf{Create a new project}.
Then select \textbf{Empty Project} and click \textbf{Next}.
Next, you need to set the \textbf{Project name} and the \textbf{Location}.
I would suggest making one directory for your CS 200 projects, like
instead of the default path that Visual Studio provides.
Click \textbf{Create} once you're done here.
Now we have an empty solution. We need to add one source code file
to get started with our program. On the right-hand side of the screen
is the \textbf{Solution Explorer} with the solution (``Solution ToolsSetup'')
and the project (``ToolsSetup'').
Right-click on the project and click on Add $\to$ New item...
Select the \textbf{C++ File (.cpp)} and give it a name like \textbf{tools.cpp}
\color{red}NOTE: the filename MUST end in .cpp!\color{black}
Click on \textbf{Add} once you're done.
Now in your \textbf{Solution Explorer} you'll see your \textbf{tools.cpp}
file under ``Source Files'', and the editor should have opened the source
file as well, allowing you to start typing code.
\subsection{Writing a program}
Type out the following program source code. Note that copy-paste
out of this document might not work properly, so it's better to
just type it all out.
#include <iostream>
using namespace std;
int main()