Jūs esatecpp
cpp
Point multiplication in Elliptic Curves
I was browsing the web for information about the binary multiplication (also known as "left-to-right multiplication") in Ellipti curves. I wrote a demonstration of the algorithm. Unfortunately, it's very brief version, but it might be interesting for someone :) This demonstration generates the right point multiplication sequency in binary multiplication of point.
First - very short theory. Point multiplication is the operation: Q = k∙P. Point multiplication is the combination of point doubling and point addition.
How many C++ programmers does it take to change a light bulb?
How many C++ programmers does it take to change a light bulb?
You’re still thinking procedurally. A properly designed light bulb object would inherit a change method from a generic light bulb class, so all you would have to do is send a light-bulb-change message.
GTK žinutės (Message Box) išmetimas
WinAPI turi tokią funkciją kaip MessageBox(). GTK bibliotekoje ieškojau analogo ir suradau:
#include <gtk/gtk.h>
// Kodas...
GtkWidget *dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Nenurodytas rezultatų failas!");
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
makefile pavyzdys
Jeigu programuojate su C/C++, turbūt dažnai tenka nurodyti daugybę C++ failų g++ programai (kažkas tokio: g++ failas.cpp kitas_failas.cpp desimtas_failas.cpp ir t.t.).
Iš mistikos sferos
Turime klasės header faile konstruktoriaus/destruktoriaus aprašymą: Sorting() ir ~Sorting(). Klasės cpp faile: Sorting::Sorting() { } ir Sorting::~Sorting() { }
Klausimas: kodėl to niekaip G++ kompiliuoti nenori? Tvirtina, jog:
> g++ gbsort.cpp -Wall
/tmp/ccy8OFFP.o: In function `main':
gbsort.cpp:(.text+0x200): undefined reference to `Sorting::Sorting()'
gbsort.cpp:(.text+0x244): undefined reference to `Sorting::~Sorting()'
collect2: ld returned 1 exit status
Kaip bebūtų keista, jei aš header faile pakeičiu Sorting() į Sorting() {} ir ~Sorting() į ~Sorting() {} - veikia.

