I'm learning C++ iterators. I had a weird bug when trying to get a member of a structure from an iterator, i was getting the wrong number. After a lot ...
I'm learning C++ iterators. I had a weird bug when trying to get a member of a structure from an iterator, i was getting the wrong number. After a lot ...
I would like to edit numbers in p2 according to the code in for cycle. But If I try to write out actual number in p2, I don´t see anything in output. ...
My aim is to get two forms of output from the program, one with all the print statements that will come into action and the other is the program will ...
I am trying to implement my own basic_string, but came across a problem with printing my strings. I am not going to use std::char_traits and other tra ...
Though the report file is able to take in data when I send it, it refuses to print out each line when I try with the cout << line << end ...
In our application we are reading from database table and there one particular column contains 99999999 and when same is stored in double it get chang ...
I am looking for the positions of an element using find(); method, but for some reason it conflicts whit the cout<< and I don't understand why. ...
I was just wondering what does my OS do if it ran out of memory and I wrote the following code. But as I began to print the address of p and to my ...
Code 1 : - Output :- I wonder why line 6,8 gave me different outputs. I was expecting "-1" from both the lines. However when I tried "all" inste ...
As is well noted, the one thing that didn't make it into C++20's format library was a function that prints to standard out, or to a generic file strea ...
In a book named "Think Like a Programmer" by Anton Spraul, on chapter 2, exercise 1, page 53, this is what is written: Using the same rule as the ...
I want to know if there is a way to, as the title says, console out on the lines next to the line that gets the input. I want the console to look lik ...
I am trying to do a program to check for all permutations of a word. Link to Codewars Kata: https://www.codewars.com/kata/5254ca2719453dcc0b00027d/tra ...
I trying to build fft function in c++. I realized there are errors in the process so I wanted to print each step on it's own. When I try to do cout to ...
I have just started learning c++. I wrote this program for finding how many vowels in a sentence. But when i run the program it asking for input befor ...
I'm currently new to C++ and learning the basic syntax. I'm exploring how getLine() works and I'm trying to compare the standard input and a getline( ...
i am making chess and i used this code to insert white blocks what i want to know is how to increase size of the white squares, also i'm planning t ...
Here's is an example: It will print me this: But I want this: How I can do it with IO manipulators without setprecision()? Why without? Becau ...
I want to show a message before an input : But when running program it does not show the message and getche() works and after that the message is s ...
I have a string function that I would like to output the following cout lines. The problem is the function must return a string and I'm not sure th ...