• Keine Ergebnisse gefunden

„C++ / GUI “ Exercise 20 1 operators for sorting

N/A
N/A
Protected

Academic year: 2021

Aktie "„C++ / GUI “ Exercise 20 1 operators for sorting"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

„C++ / GUI “ Exercise 20

1 operators for sorting

In this exercise, we reuse the class Number and the sort functions for vectors.

1. What does vector<Number> w; w.push_back(6); do?

2. Implement Number( int );, and try again!

3. What does cout « w[0] do?

4. Implement ostream &operator « ( ostream &, Number );, and try again!

5. What does sort( w );

6. Remove sorted( Number, Number ), and try again!

7. Define the operator you used in the generic sorted-function for two Numbers, and try again!

Have fun!

1

Referenzen

ÄHNLICHE DOKUMENTE

Based on the work of Kummer in cyclotomic fields, Dedekind developed the theory of the ideal class group for quadratic field extensions, as well as a generalization of it to all

This paper provides new results on: the computation of the Nakamura number, lower and upper bounds for it or the maximum achievable Nakamura number for subclasses of simple games

Hand in by Thursday, October 29, 2015 at 08:30 in the corresponding mail-box in the H¨ orsaal- geb¨ aude (numbers of the mail-boxes of the exercise groups on the web-page of

However, in adverse cli- matic conditions like heat and high humidity, intensive exercise, especially when involving large muscle groups, can be a risk for the health of children

This class represents a given level of Sokoban, i.e., the playing field (board) with the initial positions of the boxes and the player as well as the positions of the

Reimplement the swap function of the last exercise using reference parameters.. Can you reimplement your

sort the second half of the vector backwards3. macht die vector-Ausgabe

Define a function int sorted( Type one, Type two ) , which returns 1 if num- ber one is less or equal than number two and 0 otherwise.. Write a function to sort two elements of