GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Data Structures 2019.01.24

Ryan Monaghan Data Structures Englisch 1 Seite

Inhalt der Notizen (1)

Seite 1

Begin at Slide 24 from Chapter00.pdf

Linked Chain of Nodes or Singly Linked List:

We need to know the beginning which is pointed by the head pointer

See in class code

Vectors:

Vectors can be thought of arrays that can grow (and shrink) in length while your program is running.

Declare a variable v for a vector with base type int: vector v;

The vector definition is given in the library vector, which placed it in the std namespace.

When we want to use vectors, we should include the following: #include using namespace std;

How to get size of array:

int arr[] = {1,3,5,9}

int size = sizeof(arr)

How to get size of vector:

myvector.size();

myvectory(1) How to access an element in a vector

myvectory.at(1) or you can use this one

Informationen

Beschreibung
Data Structures (Data Structs) Notiz am Data Structures 2019.01.24, erstellt von Ryan Monaghan am 24/01/2019.
Erstellt von
Ryan Monaghan
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck