Explore tweets tagged as #CodingInCPlusPlus
@zerocool_m12
zerocool_m12
1 year
'std::cout' is an object of a class, and this object can be used by associating the operator '<<', but it also can be used in another forms. #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
4
@zerocool_m12
zerocool_m12
1 year
Easiest way to print out the content of a file directly to stdout? Nothing better than iterators. Below is a way to copy a text file to the 'std::cout'. #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
4
@zerocool_m12
zerocool_m12
1 year
One of the interesting facts about 'sizeof' operator is that it never evaluates. The output of the below snippet of code will be 4 👍🏼.#365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
1
0
6
@zerocool_m12
zerocool_m12
1 year
Tweet media one
2
0
5
@zerocool_m12
zerocool_m12
1 year
Static variables inside template functions are always subject to the type of the function. Static counter in below function is restarted when the function type became float. Output = 010. #365dayscoding #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #programming
Tweet media one
3
0
4
@MhHunjan
Manmohan Hunjan 🧑‍💻⚛️
2 years
Just coded a simple linear search in C++! . 🚀 It finds the target in an array efficiently. 🔍 Here's how it works:. -We iterate through the array and return true if we find the target. -If not, we return false. Easy and effective! 💡 #CodingInCPlusPlus #Algorithm
Tweet media one
0
1
2
@zerocool_m12
zerocool_m12
1 year
Passing the size of every dimension of a multi-dimensional array independently to a function is a bit time consuming. Herein below an example of passing a 2d C-style array to function by merely passing the array itself:.#programming #codedaily #cplusplus #cpp #codingincplusplus
Tweet media one
0
0
3
@zerocool_m12
zerocool_m12
1 year
When trying to get positive value of int, the + won't change anything.The output of 'y' in the below is -4 as the the + is ignored so the assignment was like y=x.#365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
2
@zerocool_m12
zerocool_m12
1 year
The header 'iomanip' introduced the 'put_time' function to print out the time. The function is more flexible than the usual 'strftime'.#365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
1
@zerocool_m12
zerocool_m12
1 year
Iterators are among the most useful tools in the C++ standard library. here is below an easy & safe way to load a file into 'std::vector' buffer using iterators:.#365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
2
0
9
@zerocool_m12
zerocool_m12
1 year
Legacy random function 'rand()' is not recommended due to its limited range & thread safety issues. Mersenne Twester algo on the other hand is way safer & better.#365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
2
@zerocool_m12
zerocool_m12
4 months
Encoding a text by converting each ascii code to its hexadecimal representation. #365dayscoding #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #programming #programminghelp
Tweet media one
0
0
1
@zerocool_m12
zerocool_m12
1 year
A simple example of how 'variadic templates' works by enabling a function to accept an arbitary number of arguments. C++17 introduced 'folding expression' which does almost the same. #365dayscoding #programming #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #DSA
Tweet media one
0
0
2
@zerocool_m12
zerocool_m12
1 year
One of the crucial things to do when developing a program that interacts with the user is to secure your program against invalid inputs . Below is a trevial program that is well-secured against any unexpected inputs.#codedaily #cplusplus #cpp #codingincplusplus #DSA #programming
Tweet media one
0
0
0
@zerocool_m12
zerocool_m12
1 year
The third argument of the function 'std::sort' is about how you want the container to be sorted in. Below is an example of how to sort an array in two different orders:.#365dayscoding #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #programming .#programminghelp
Tweet media one
0
0
4
@zerocool_m12
zerocool_m12
1 year
I know it's a trivial thing to do but since there is nothing about binary representation in STL such as 'std::hex' & 'std::oct'. I find the below is the simplest way to get binary notation:.#365dayscoding #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #programming
Tweet media one
1
0
2
@mehdiali_mk
Mehdiali Kadiwala ✪
1 year
DAY – 41: Learning C++. - Section Challenge. Github Link: LinkedIn: Instagram: #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #cplusplusprogramming
Tweet media one
1
0
6
@mehdiali_mk
Mehdiali Kadiwala ✪
1 year
DAY – 40: Learning C++. - To add two matrices. Github Link: LinkedIn: Instagram: #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus #cplusplusprogramming
Tweet media one
0
0
4
@mehdiali_mk
Mehdiali Kadiwala ✪
1 year
DAY – 33: Learning C++. - Passing Pointers to a Function. Github Link: LinkedIn: Instagram: #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus
Tweet media one
0
0
3
@mehdiali_mk
Mehdiali Kadiwala ✪
1 year
DAY – 26: Learning C++. - To insert an element to an array. Github Link: LinkedIn: Instagram: #365dayscoding #100daysofcodechallenge #100daysofcode #codedaily #cplusplus #cpp #codingincplusplus
Tweet media one
0
0
3