Programmargumente können entweder auf der Kommandozeile übergeben werden:
gdb --args ./prog arg1 arg2 arg3
oder als Teil des gdb-Befehls run:
gdb ./prog
| // Hashtabelle ist Beispiel für die Nutzung von Zufall und Wahrscheinlichkeit | |
| // Hashtabelle ganzer Zahlen | |
| // verwendet verkettete Liste zum Umgang mit Kollisionen | |
| public class IntHashtable { | |
| public static final int TABSIZE = 1024; // Größe der Hashtabelle | |
| private IntListNode[] tab = new IntListNode[TABSIZE]; // die eigentliche Hashtabelle | |
| // berechne den Hashwert von elem |
| import java.util.Arrays; | |
| public class Main { | |
| public static void main(String[] args) { | |
| int N = 10; | |
| Wohnung[] wohnungen = new Wohnung[N]; | |
| Wohnung klein = new Wohnung(3, 28); |
| import java.util.Arrays; | |
| public class Haus { | |
| private Wohnung[] wohnungen; | |
| public Haus() { | |
| wohnungen = new Wohnung[0]; | |
| } |
| import java.util.Arrays; | |
| public class Main { | |
| public static void main(String[] args) { | |
| int N = 10; | |
| Wohnung[] wohnungen = new Wohnung[N]; | |
| Wohnung klein = new Wohnung(3, 28); |
| #include <QQueue> | |
| #include <QSet> | |
| #include <iostream> | |
| #include <cstdint> | |
| class Pixel | |
| { |
| import logging | |
| __author__ = 'ondra' | |
| logger = logging.getLogger("apples") | |
| class Apple: | |
| def __init__(self, number, name, bloom_time, good_donors=None, other_donors=None, | |
| triploid=False): | |
| """ |
| #include <linux/init.h> | |
| #include <linux/module.h> | |
| #include <linux/fs.h> | |
| #include <linux/device.h> | |
| #include <linux/cdev.h> | |
| #include <linux/semaphore.h> | |
| #include <linux/slab.h> | |
| #include <linux/uaccess.h> | |
| #include <linux/thread_info.h> | |
| #include <linux/sched.h> |
| // Released into the public domain. | |
| // http://creativecommons.org/publicdomain/zero/1.0/ | |
| #include <string> | |
| #include <cstdio> | |
| #include <fcntl.h> | |
| #include <io.h> | |
| #include <windows.h> |
| import io | |
| import struct | |
| container_chunks = {b"RIFF", b"LIST"} | |
| class RiffChunk: | |
| def __init__(self, tag, data): | |
| self.tag = tag | |
| self.data = data |