---
title: "Srikanth Anantharam (@sria91) | Hashnode"
description: "Software Practitioner | Lifelong Learner. Read the latest articles by Srikanth Anantharam on Hashnode."
url: "https://hashnode.com/@sria91"
---

@sria91

# Srikanth Anantharam

@sria91 · Bengaluru, Karnataka, India · Joined September 2022

Software Practitioner | Lifelong Learner

[Website](https://srikanth.one/)

### [(A case for) Creating a stack-allocated Stack container in C++](https://blog.srikanth.one/a-case-for-creating-a-stack-allocated-stack-container-in-c?utm_source=hashnode&utm_medium=feed)

I've always looked inside the C++ STL and wondered why the library provided stack container is not allocated on the stack section but is actually allocated on the heap. A container which is allocated on stack would be handy in embedded systems where ...

3 min read · [blog.srikanth.one](https://blog.srikanth.one/a-case-for-creating-a-stack-allocated-stack-container-in-c?utm_source=hashnode&utm_medium=feed)

[Oct 6, 2023](https://hashnode.com/posts/a-case-for-creating-a-stack-allocated-stack-container-in-c/65204b7906b6e2659eca7223)

### [Swapping the position of the two words in a string represented by a singly linked list](https://blog.srikanth.one/swapping-the-position-of-the-two-words-in-a-string-represented-by-a-singly-linked-list?utm_source=hashnode&utm_medium=feed)

Recently I've been giving interviews as my last contract got completed. In one of the interviews, I was asked to write a data structure for a string using a singly linked list. The constraint was that the string would have exactly two words separated...

6 min read · [blog.srikanth.one](https://blog.srikanth.one/swapping-the-position-of-the-two-words-in-a-string-represented-by-a-singly-linked-list?utm_source=hashnode&utm_medium=feed)

[Sep 23, 2023](https://hashnode.com/posts/swapping-the-position-of-the-two-words-in-a-string-represented-by-a-singly-linked-list/650edd06c6500f8dfffd8bdf)

### [Converting any class into a Singleton class in C++](https://blog.srikanth.one/converting-any-class-into-a-singleton-class-in-c?utm_source=hashnode&utm_medium=feed)

Singleton is one of the creational design patterns. A singleton class has only one instance and provides a global point of access to that instance. It's commonly used when you want to restrict the instantiation of a class to a single object, which ca...

4 min read · [blog.srikanth.one](https://blog.srikanth.one/converting-any-class-into-a-singleton-class-in-c?utm_source=hashnode&utm_medium=feed)

[Aug 31, 2023](https://hashnode.com/posts/converting-any-class-into-a-singleton-class-in-c/64f0b5460fd9596509f74dfb)

### [A tutorial for accessing C/C++ functions within a shared library (.dll/.so/.dylib) from Rust](https://blog.srikanth.one/a-tutorial-for-accessing-cc-functions-within-a-shared-library-dllsodylib-from-rust?utm_source=hashnode&utm_medium=feed)

\[19-09-2023\] Updates: Add instructions and code for an alternative way to build and run using build.rs and cmake-rs Fix the reason why not to link to C++ functions directly Include <cstring> in the code and use free instead of delete as strdup gen...

7 min read · [blog.srikanth.one](https://blog.srikanth.one/a-tutorial-for-accessing-cc-functions-within-a-shared-library-dllsodylib-from-rust?utm_source=hashnode&utm_medium=feed)

[Dec 4, 2022](https://hashnode.com/posts/a-tutorial-for-accessing-cc-functions-within-a-shared-library-dllsodylib-from-rust/638c59ea764815b4080dfd9f)

### [Correctly rotating an image to an arbitrary angle in OpenCV](https://blog.srikanth.one/correctly-rotating-an-image-to-an-arbitrary-angle-in-opencv?utm_source=hashnode&utm_medium=feed)

Introduction Have you ever tried to rotate an image in OpenCV? It's damn simple, right? You include the OpenCV headers:#include <cmath> #include <iostream> #include <algorithm> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <ope...

3 min read · [blog.srikanth.one](https://blog.srikanth.one/correctly-rotating-an-image-to-an-arbitrary-angle-in-opencv?utm_source=hashnode&utm_medium=feed)

[Sep 10, 2022](https://hashnode.com/posts/correctly-rotating-an-image-to-an-arbitrary-angle-in-opencv/631cd3fe3e8d6f3497ad3efc)
