mirror of
https://github.com/hazemKrimi/jack-vm-translator.git
synced 2026-05-01 18:00:27 +00:00
19 lines
347 B
C++
19 lines
347 B
C++
#include <iostream>
|
|
#include <random>
|
|
#include <ctime>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
string generateRandomLabel() {
|
|
random_device rd;
|
|
mt19937 gen(rd());
|
|
uniform_int_distribution<> dis('A', 'Z');
|
|
string label;
|
|
|
|
for (int i = 0; i < 8; ++i) {
|
|
label += static_cast<char>(dis(gen));
|
|
}
|
|
|
|
return label;
|
|
} |