python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
C++11 Template Method to Stream std::map to std::cout
Objective: Implement a template method that generically allows streaming std::map instances to std::cout
Problem: I'm getting undefined behavior, where my code executes without errors and other times ...

Tony A
Votes: 0
Answers: 1
cout changes returned value from function
This is the code for recursive binary search
Without using cout << binarySearch
int binarySearch(int arr[], int l, int h, int key)
{
int mid = l + (h - l) / 2;
if (l <= h)
{
...
Amish
Votes: 0
Answers: 2
Can't for the life of me get this to align in C++
been trying to get this to align, and every source has told me to use left and setw, but no matter how I format it I can't seem to get it to work. Anyone have any ideas?
#include <iostream>
#inc...
ItsYaBFF I
Votes: 0
Answers: 2
I can't see all elements of the array on the screen in Visual Studio
In my program I have 30 elements of the array. When I try to "COUT" them on the screen using "\t" between them - they stop on the 15th or so element. But if I use "endl" ...
serhii derkach
Votes: 0
Answers: 0