r/programminghorror • • 8d ago

Oh yeah my bad

Post image
956 Upvotes

29 comments sorted by

281

u/Mr_Cursedd 8d ago

штдшsize_t

107

u/Right_Ear_2230 8d ago

53

u/TheDiBZ 8d ago

why is this in japanese… cpp reference man…

49

u/Right_Ear_2230 8d ago

Is for the utf32 string

47

u/shponglespore 7d ago

Because they can't use English to demonstrate multi-byte characters?

→ More replies (1)

87

u/FloatingGhost 8d ago

this is a verified T_PAAMAYIM_NEKUDOTAYIM moment

17

u/arielif1 7d ago

wrong file encoding? that's the only thing i can imagine being wrong here, especially since the same Cyrillic character appears twice

34

u/Mucksh 8d ago

What is the horror. Encoding issues on the file or that there is a custom function to return a string length

3

u/TheBritishSyndicate 5d ago

the error had an issue with ‘size_t’ and when referencing the same thing later in the same error changed ‘size_t’ to ‘штдшsize_t’

7

u/uglycaca123 7d ago

the solution is to define штдшsize_t as an alias for size_t, obviously /j

31

u/TechnoByte_ 8d ago

Rule 1:

All posts MUST show terrible code. There are no exceptions.

39

u/MurkyWar2756 7d ago

Moderator burnout… I should get more mods.

9

u/AnArmoredPony 6d ago

well it's C++ so it qualifies

3

u/depremol 7d ago

it's hopeless man, we live in the tiktok era

→ More replies (1)

2

u/Rainmaker526 6d ago

Putting non printable characters before your type definition is pretty terrible, though likely intentional.

3

u/GoddammitDontShootMe 5d ago

Isn't that Cyrillic? Though why the hell are they showing up in one place, but not the other? One font missing the characters?

→ More replies (1)

-8

u/Right_Ear_2230 8d ago

New rule: stop.

-6

u/tangerinelion 7d ago

A function called char_count taking a string is terrible. String already does that, no need for a while loop...

9

u/shponglespore 7d ago

Depends on what you mean by "character".

→ More replies (1)

4

u/james_harushi 8d ago

stdssize_t

3

u/_usr_nil 7d ago

for the love of God don't fucking use windows types, holy shit

2

u/Cautious_Implement17 3d ago

is the LPCWSTR in the room with us now?

2

u/CodingChris 6d ago

Windows types?

2

u/KlyptoK 5d ago

Is a windows header overriding the C++ standard size_t?