Skip to content

Instantly share code, notes, and snippets.

View WINSDK's full-sized avatar
🐫

Nicolas Mazzon WINSDK

🐫
View GitHub Profile
@WINSDK
WINSDK / cpp.md
Last active September 7, 2025 08:50

Modern C++

C++ Basics

  • Algorithms and templates/structs in C++
  • std::copy vs memcpy: std::copy is type-aware (no sizeof(T) * n). It also calls the copy/assignment constructor on each object. Overlapping pointers are safe. memcpy can be faster.
  • malloc(sizeof(T)) vs new T: type-aware, calls constructors. Doesn't require void* casting. You can also override operator new.

Mono alphabetic substitution

Map input characters to a keyword's character's . REMEMBER THAT FOR AFTER KEYWORD, YOU MUST IGNORE THE KEYWORDS LETTERS.

Keyword = CRYPTO Gewoon alfabet: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Geheim alfabet: C R Y P T O A B D E F G H I J K L M N Q S U V W X Z

Ciphertext: A B C D E F G -> C R Y P T O A