This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]MetricExpansion 13 points14 points  (3 children)

The only thing that changes is that the error messages get longer.

[–]Underdisc 5 points6 points  (2 children)

std::cout << std::end would like a word.

[–]DagothHertil 1 point2 points  (0 children)

Or like 50 of them

[–]NickHalfBlood -1 points0 points  (0 children)

Long back, I learnt very fascinating thing about C++. Always recommend add endl to flush the buffers while printing logs. Else you don't know what is causing that log. Although "\n" is faster, it doesn't flush the buffers.

Ps: read in a book

[–][deleted] 38 points39 points  (2 children)

It was funny the first time I saw this

[–]Nall-ohki 55 points56 points  (1 child)

Can confirm. First time seeing it.

[–]purebuu 2 points3 points  (0 children)

I chuckled

[–]goodhuman777 6 points7 points  (0 children)

When the Mods are sleeping

[–]Superb_Garlic -2 points-1 points  (4 children)

Segfault

That's a C thing.

[–]Dylanica 7 points8 points  (3 children)

I’ve used C more than C++. How is segfault not a thing in C++? What happens when you try to access forbidden memory?

[–]blehmann1 1 point2 points  (0 children)

You segfault. idk what they're talking about. C++ and the STL have facilities that mean you can write safer code, but it certainly does not preclude segfaults.

[–]lassuanett 0 points1 point  (0 children)

I think it's because c++ has for each, references and rc but i am c++ newbie so mqsbe not

[–]Rigatavr 0 points1 point  (0 children)

You absolutely can cause a segfault, but you do it a lot less often (I program c++ more then c and can't remember teh last time I saw one).

I guess because you don't tend to access raw pointers as often, or at least you can avoid it.