[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
C++ appreciation thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 16
Thread images: 2
File: CPlusPlus.jpg (36 KB, 433x455) Image search: [Google]
CPlusPlus.jpg
36 KB, 433x455
C++ appreciation thread
>>
C++ gets closer to being not completely terrible every revision.
>>
>>52514738
I'm falling in love with c++11 std:thread, waiting for c++17 cross platform file api (goodbye dirent.h and Windows API mess (now Microsoft is hiding API functions older than Windows XP)
>>
File: furby.png (227 KB, 572x380) Image search: [Google]
furby.png
227 KB, 572x380
>Move semantics
>Strongly typed enums
>Unicode string literals
><filesystem>
What a time to be alive
>>
Best C++ learning reference?
>>
>>52516739
accelerated c++ is great if you have experience with other languages
>>
c++ is alright
>>
>>52514738
>2016
>shilling c++
reddit v2.0
>>
>>52514738
I LOVE C++. Everything about it just seems so... right, and fitting.
>>
>>52514738
>day job
>have to write java
>on IBM
>1.6
>in healthcare
>with soap

It gets worse:
I have no transaction security on my database, or rollbacks
An email address for a single user is stored in 15 different tables, services, and databases.
They're rolling out adobe experience manager, aka enterprise WordPress
We have to build an angular spa on top.

With 1000 indians

Why can't I have my c++ back?
Please kill me.
>>
I'm a second year CS student and we learn c++ at my school. Is there anything that i'm probably doing with c++ that I shouldn't be doing as far as conventions go?

I still use namespace std [spoiler] because i can't fucking understand why not to use it [/spoiler]
>>
>>52520018
and apparently i'm not good at using spoiler tags either fuck
>>
>>52520018
You should basically never use using namespace * in your code. The reason is that it not only introduces function name conflicts and makes it difficult to tell where a function is fomr, but also that it is recursive. If you end up specifying using in namespace Y for namespace Z and in namespace X use namespace Y, everything in Z will come along with it. If you really can't be bothered to type a super long namespace you can alias it like
namespace ipadr =boost::asio::ip::address;
>>
>>52520018
It's probably just easier if you leaf through "effective C++" and "effective modern C++" by Scott Meyers, rather than us giving you a bunch of bullet points.

>I still use namespace std because i can't fucking understand why not to use it
In general, using statements are fine as long as you keep them localized so that they don't leak throughout the rest of your project (ie. write them at the top of a function to confine their scope to that block. Don't put them in the global namespace at the top of a header that gets included all over the place).

Why? Because:
>>52520166
^ beat me to it
>>
>>52520244
Also one day you'll just be used to typing std::vector, and vector by itself will look weird and silly. :)
>>
>>52520166
You can also use particular symbols from a namespace like using std::cout
Thread replies: 16
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.