• Enum to String in C++
    19 July

    Convert enum to string in C++

    There are a variety of methods to convert enum to String in C++. In this article, we will discuss some of the efficient and easy ways to convert enum to string. enum is a user-defined data type that contains integral constants. We use the keyword ‘enum’ to define it. Example: [crayon-614d55eb2de2b294166565/] Here the name of […]

  • JSON parser in C++
    19 July

    JSON Parser in C++

    In this post, we will see about JSON parser in C++. There is no native support for JSON in C++. We can use a number of libraries that provide support for JSON in C++. We will use JsonCpp to parse JSON files in C++ which is very popular. It is an open source library and […]

  • Trim String in C++
    19 July

    Trim String in C++

    When we take an input from an user, strings can have unwanted whitespaces in the start or end of the string. We can trim the strings to get rid of the extra whitespaces in the start and in the end, but not in the middle of the String. For example, if a user inputs some […]

  • Merge two vectors in C++
    11 June

    Merge two Vectors in C++

    vectors are like dynamic arrays and they can be resized when an element is added or deleted. Their storage is handled automatically by the container. C++ allows multiple features which can help in merging two vectors efficiently. In this article, we will discuss six different ways to merge two vectors in C++. Using merge() to […]

  • C++ random number between 0 and 1
    11 June

    C++ random number between 0 and 1

    Random numbers are frequently used in programming for test case generation, cryptography, and other related purposes. In this tutorial, we will generate random number between 0 and 1 in C++. The numbers generated are fractions, so they will be either float or double values. Using the rand() function to generate random number between 0 and […]

  • String contains C++
    07 June

    Check if string contains substring in C++

    There are different ways to check if string contains substring in C++. Library functions are available in C++ like find() and strstr() to find the substring in a string. In this article, we will discuss multiple methods to check if a string contains a substring in C++. Using find() function to check if string contains […]

  • Convert float to String in C++
    24 May

    Convert float to String in C++

    Learn about how to convert float to String in C++ in different wayds.

  • Vector of Structs in C++
    18 May

    Vector of structs in C++

    In this article, we will see how to initialize and use vector of structs in C++. There are different ways to do it. This article will explain these methods clearly. Using Range Constructor We can utilize the range constructor for the initialization of vector of structs in C++. It is useful when we need to […]

  • Convert int to char array in C++
    18 May

    Convert int to Char Array in C++

    There are different ways to convert int to char array in C++ that we will explain in this article. Using to_string and c_str methods to convert int to Char Array in C++ In this method, we will first convert the number to a string by utilizing the to_string method in C++. Then we use the […]