Anna CS 123 - C++ Full Course
School name Anna University
Course Cs 123-
Pages 2

Unformatted text preview:

C Full Course for free Bro Code C plus plus is a middle level programming language that is very fast compared to other programming languages It s commonly used in advanced graphics applications such as adobe applications and video editing software There is a learning curve with c plus plus but if you can learn it it s worth it there s two things you ll need to get started Downloading a new c plus plus file is easy for Linux and mac users Downloading the cpp extension is a great way to get a c plus file to work with Follow the installation instructions on this website under step 5 we will type pack man dash capital s y We ll have to find the bin folder of mingw it s likely going to be within your c drive go to msys64 mingw64 bin then copy this address we ll need to add that path to the windows path environment variable to do so search settings settings then just hit enter proceed with the installation type yes type y enter again then give it a moment then close out of this window A quick introduction to getting started with c plus i ll post this code in the comment section down below if you would like a copy of it down below The video was created to show how to create and using a variable declaration and assignment The code was created with a declaration to declare a variable declaring and assignment declaration There s different data types depending on what you need to store within a variable In programming programming you can store more than just numbers but can store characters even whole sentences To display a variable we can use standard output c out we will display x and let s see what we have there s our value five is a double this is a number including decimal including decimal a few examples of a double would be maybe a price there s dollars and cents double price equals 10 99 what about a gpa a grade point average that includes a decimal double gpa equals 2 5 uh then maybe a temperature double temperature equals 25 1 To store a single character you use single quotes this student has an a two more examples A string is a type of object that represents a sequence of text such as a name a day an address etc character even whole sentences like a name or an address The const keyword specifies that a variable s value is constant it tells the compiler to prevent anything from modifying it so that it s effectively read only Any variable we do not want to be able to be changed at all we can turn into a constant A const is a keyword that will modify a variable or some value so that it s read only and ca n t be changed By including constants it adds some data security Each entity needs unique name but if we use namespaces then two or more entities can share the same name to create a namespace Namespaces can have different versions of the same variable as long as they re within a different namespace The standard namespace has hundreds of different entities let me typedef is a reserved keyword used to create an additional name for another data type kind of like a nickname it s a new identifier for an existing type typedef helps with readability and reduces typos a namespace provides a solution for preventing name conflicts each entity needs a unique name and a namespace allows for identically named entities as long as the namespaces are different typedef has largely been replaced with the using keyword that works better with templates The using keyword is more popular than typedef nowadays just because it s more suitable for templates typedef is a new identifier for an existing data type it helps with readability and it reduces typos however you should only be using typedef and using keywords when there is a clear benefit If you need to add one student well if we re working with the variable we could say students equals whatever students is plus one then we could display this standard output i will display students the current number of students that we have are 21 There is a shorthand way of writing this too in place of saying students equal students plus one we could shorten this to students plus equals one


View Full Document

Anna CS 123 - C++ Full Course

Course: Cs 123-
Pages: 2
Documents in this Course
Load more
Download C++ Full Course
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view C++ Full Course and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view C++ Full Course 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?