[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: C++.jpg (298 KB, 3000x2000)
298 KB JPG
>>
Yeah
>>
>>108800552
After 14 years together I really like and really hate C++ at the same time.
>>
Yeah, another lame ass general that this board desperately needs
>>
>>108800552
Dead.
>>
File: bjarne_animated.gif (2.9 MB, 540x526)
2.9 MB GIF
>>108800552
based lang
>>
>>108800552
>need to interface with libraries written by other people
>"heeeey guess what dude, you need
extern "C"
or this whole shit won't compile"
>have to check every
#include
to see where the fuck the error it's happening because the compiler only sees the last entry and it's not reliable
>"heeey guess what dude, you forgot to declare something else as
extern "C"
so I still won't compile lmao
>also whaat the fuck is
#pragma
? I still included that header twice lmao


I mean, for everything else is a good language but interfacing with C and headers in general are a pain in the ass.
>>
>>108802233
Don't think I've seen gcc ignore
#pragma once
, but if it ever did, I'd probs go full #include guard on its ass.
>>
File: 1681773011838676.png (207 KB, 432x324)
207 KB PNG
>>108800552
>>
>>108802328
I don't know if it was the C compiler of the C++ one, but it sure ignored it.
Must've been the toolchain or something. First (and last) time it happened to me too.

But yeah nothing beats the 'ol reliable
#ifndef __SPECIFIC_HEADER_H
#define __SPECIFIC_HEADER_H
/* header here */
#endif



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.