100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Samenvatting

COS1511 Book Summary

Beoordeling
4,3
(3)
Verkocht
21
Pagina's
41
Geüpload op
23-07-2019
Geschreven in
2018/2019

This document consists of a summary of the whole module for revision

Instelling
Vak

Voorbeeld van de inhoud

Lesson 1 - Your first program
Friday, 03 March 2017 11:53 AM

General rule:
Always use << with cout.


Include <iostream>:
Special instruction that we always put at the top of the code to tell the compiler to include the
iostream header file. Header files basically define a number of additional instructions that we can
use in our programs to make them simpler and neater. A particularly useful one is iostream. The io in
iostream stands for Input/Output and this header file allows us to use the cout instruction to output
messages to the screen.


namespace std;
Some C++ compilers allow you to leave this out.


#include <iostream>
int main( )
{
std::cout << "Hello world";
return 0;
}


cout is defined in the iostream header file. All the names defined in it belong to a namespace called
std. If you don't use using namespace std; in your program, then you should prefix every name that
belongs to the std namespace with std::.


int main( )
This is the header for the main function of the program.


Semicolons:
Semicolon is called a statement terminator. Each statement must be terminated by a semicolon.


cout <<:
Stands for console output (display). Pronounce cout as “see-out”


Comment statement:
Is a text that we add to a program that has no effect on the running of the program but that is
generally used to explain what the programming (or part of the program) does.


//This is a comment statement



UNISA Page 1

, Endl:
Endl stands for end line. When used with cout it makes output continue on the next line.


C++ Structure:
//DescriptiveComment
#include <StandardHeaderFile>
using namespace std;

int main( )
{
StatementSequence;
}





UNISA Page 2

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
23 juli 2019
Aantal pagina's
41
Geschreven in
2018/2019
Type
SAMENVATTING

Onderwerpen

€4,26
Krijg toegang tot het volledige document:
Gekocht door 21 studenten

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Beoordelingen van geverifieerde kopers

Alle 3 reviews worden weergegeven
5 jaar geleden

5 jaar geleden

5 jaar geleden

4,3

3 beoordelingen

5
2
4
0
3
1
2
0
1
0
Betrouwbare reviews op Stuvia

Alle beoordelingen zijn geschreven door echte Stuvia-gebruikers na geverifieerde aankopen.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Naz1611 University of South Africa (Unisa)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
87
Lid sinds
6 jaar
Aantal volgers
81
Documenten
0
Laatst verkocht
3 jaar geleden

4,0

7 beoordelingen

5
3
4
1
3
3
2
0
1
0

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen