Software Tutorials

C++ VS



Use VS 2019
opening code: #include <iostream>
; for ending for a completed syntax
Ctrl + F7 hot key to Comply → Build to integrate different sets of codes together

Variables: integers, boolean, double, floats...

(a data stored in different types of memory)

Set variable: inset between opening code
image.png
it means integer variable, name as VariableTest, value 69 data stored

To print the value in screen/application, type in main content:
image.png
click play (i.e. Local Windows Debugger command) to see:
image.png

To change variable value before it prints on screen:
image.png

Signed and unsigned variables (make to unsign to double integers)
just type unsigned at front of integer
image.png

Difference between integer and float (float has decimal places, with 4 byte of memory, integer no)

Change varialbletest to floattest, and add the intro as 101.11
referencing the float, by typing below in the main body
image.png
image.png
add f after the number, to make it as float, otherwise it will be treated as double
image.png

Double is double amount of memory than float, i.e 8 bytes of memory instead of 4
image.png
Referencing differently this time
image.png

Boolean: mean true/false, so only 1 byte of memory, commonly use for if statement
image.png
now the value will be 0, because set as false
image.png
if add the script in body below, it will become 1
image.png
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.