He actually uses C++ exclusively when C is better 99% of the time

>he actually uses C++ exclusively when C is better 99% of the time

Other urls found in this thread:

youtube.com/watch?v=KlPC3O1DVcg
youtube.com/watch?v=JBjjnqG0BP8
sourceware.org/bugzilla/show_bug.cgi?id=14092
sourceware.org/bugzilla/show_bug.cgi?id=12683
sourceware.org/bugzilla/show_bug.cgi?id=12889
sourceware.org/bugzilla/show_bug.cgi?id=14942
people.redhat.com/dj/
twitter.com/NSFWRedditVideo

>2017
>using C when C/C++ or C# exists

>tfw find C easier to write and the libraries more stable / high performance
best language

>he uses C++ when Rust is better
>he doesnt use C primarily
>he isnt using Clang
>HES A GNUMALE

>clang
hey karlie

Have fun writing a game in C. C is only good for autistic shit like systems development.

>writing games
>important
And almost every game nowadays is just built using scripting in something like Unreal or Unity.

>I want to create gayms mom! XDDD

>know C
>try to learn C++
>see a bunch of :: and bitwise shifts
>stop
why

It was designed by an autistic dane literally because he wanted to prevent people from getting into programming

>best language
youtube.com/watch?v=KlPC3O1DVcg

not actually true though

youtube.com/watch?v=JBjjnqG0BP8
The actual reason

So what do you do when you want to write generic code that can operate on multiple different data types? For example a resizable array. To avoid writing the same code for each data type you want supported, it's much easier to use templates in C++. What would you do in C?

it's even crazier now auto foo(int) -> int;

>literally afraid of namespaces
Shit tier code monkey. Would not hire.

Operator overloading was a mistake.

Namespaces are not.

Leaking namespaces through #include was.

Thank C++ for showing all the languages-to-be how not to do it.

The parts of C that don't have better counterparts in C++ are part of C++ anyway.

>Not using golang
Good luck with multithreading. And yes, your implementation is wrong

Add golang onto that list. Serious applications where security, performance, and productivity are required would mean without golang things like docker wouldn't exist. Rust is a close second.

C takes far too long to make anything productive in it.

C is a subset of C++
Checkmate, atheists

yeah I have to agree, Go is quite nice.

>implying sepples isn't comfy af

>he uses a language from the C family when Object Pascal exists

Implement the following in C using only the standard library in a cross platform way

#include
#include
void hello()
{
std::cout

Damn, guess I need to use a different thread-spawning function for my multithreaded hello world on Windows.

Also, C++'s statically linked executables are even larger than Go's, so these "cross platform" libraries come with a cost.

There's threads in C11 standard.

using netbeans to write c++ using qt

nigga why? just fucking use qt creator

Yeah, too bad glibc is shit though.

sourceware.org/bugzilla/show_bug.cgi?id=14092

:-(

#include
#include

#define NUM_THREADS 2

static int threadData[NUM_THREADS];

int
threadFunction(void * data) {
printf("Hello %d-th world\n", *(int*)data);
return 0;
}

int
main(void) {
thrd_t threadId[NUM_THREADS];

// init thread data
for (int i=0; i < NUM_THREADS; ++i)
threadData[i] = i;

// start NUM_THREADS amount of threads
for (int i=0; i < NUM_THREADS; ++i) {
if (thrd_create(threadId+i, threadFunction, threadData+i) != thrd_success) {
printf("%d-th thread create error\n", i);
return 0;
}
}

// wait until all threads terminates
for (int i=0; i < NUM_THREADS; ++i)
thrd_join(threadId[i], NULL);

return 0;
}


There's this though, so you need to either be on an operating system with a decent libc (like FreeBSD or Windows) or use musl on Loonix.

People who like Linux unironically know jack shit about low-level. glibc has several serious, exploitable bugs outstanding for almost 6 years:
sourceware.org/bugzilla/show_bug.cgi?id=12683
sourceware.org/bugzilla/show_bug.cgi?id=12889
sourceware.org/bugzilla/show_bug.cgi?id=14942
No one who knows two shits about computer science uses Linux.

wtf I love windows now

>implying glibc == linux

Show me *one* popular, large C library that's not C with classes.

Show me one major Linux distribution that doesn't use glibc.

I'm not defending Windows here. Windows has a lot of defects. Different ones, but it does have them. Not to mention it's closed source, so you can't do anything about it. Not that you can do anything about GNU code, their design is awful, it's poorly documented and their LISP-inspired code coding conventions makes their C code barely understandable.

The GNU project is pretty much the cancer killing Linux.

>C is a subset of C++
no its not

Look at all these students who think they know programming.

That's not how you hello world the C++ way.

#include

class Program {
public:
void run() {std::cout

Implying C doesn't inspire suicides.

>takes a threaded program and makes it single threaded and adds a class for no reason
hello Pajeet!

>not using OOP
Enjoy unemployment.

Like os components? Try building a os off go.

Okay, I'll give you that. The scope resolution operator is a travesty. There is no reason why it isn't just a dot. Operator overloading is useful. If you don't like the stream syntax, just used good old printf. That's the glory of C++, it allows you to cherry pick the parts you like, while ignoring the ones you don't like.

Look at that fagtron, worked on one big project where they used Java or Scala or some gay ass shit who thinks he knows programming

nice projection

no u

C++: list derp = new list();
C: list derp = make_list(sizeof(int));
So hard!

You can't tell me why it isn't without googling it. Anything you would normally write in C, you could also write in C++.

Actually, using void* to make generic types is retarded since the data will have to be dynamically allocated along with the cells of the list. Using unions or making a macro DEFINE_LIST(type) that makes different list types is much more sane.

>muh """"app"""" needs to operate on 30 different types of lists
ask me how I know you have 0 experience

As someone coming from a scripting background, should I learn C or C++. Which will likely get me a Job?

>docker wouldn't exist
and the world would be a better place

Two different lists is already too much copy-paste. Ask me how I know your only programming experience is ricing your weeb desktop.

>unions
So when you use your list library in another program you'll have to add the structs (or whatever) manually to your union? Sounds tedious.

>uses c++ exclusively

How the fuck do you do that? Everything has to start with main() which is not exclusive to C++. C++ without the C parts doesn't work very well.

#include
int main(void)
{
puts("Hello Concurrent World");
}

BTFO

int class;

kek

use lua for everything

studio.h*

>cancellation """bugs"""
damn, fizzbuzzer, you might be onto something :^)

>The GNU project is pretty much the cancer killing Linux.
interesting, considering linux wouldn't exist without the gnu project

Had to check.

int main(void)
{
int class = 0;
return class;
}

How come Bjarne is not starving under a bridge after getting fired for being a total retard?

>copy-paste
hello fizzbuzz

Penetration tester here, I fucking love it when I see clients with bespoke C applications

Nice damage control, retard, but race conditions are a serious issue.

>race conditions are a serious issue when I'm also retarded
they sure are :^)

0/10

>animooooooo

>C library that's not C with classes
there are no classes in C

SDL
Goodbye.

You didn't understand his question.

>SDL
>popular

>SDL
>half of emulators use it
>Valve uses it
>Crytek uses it
>Starbound uses it
>unpopular
(You)

It's also the worst part of C++ because everyone picks a different subset.

shrekt/10

What bothered me with C++ was:

>create header
>write function prototypes in header
>create cpp
>write functions in cpp

so bothersome

Also, what's a good c++ IDE?
Is Codeblocks good?
Are there other IDE which make life easier programming in C++ ?

I actually miss that part of C++. The header file serves as a nice catalog of all the functions and features of the file. I know modern IDEs have Outline views that serve that function, but part of me laments the fact that some people would only see the monolithic monstrosity of code that is my class and never get the big picture.

Hmm, interesting point.
I guess it also can have the purpose of hiding the complexity, which is nice when collaborating.

you don't have to do that all. you can do everything in the headers or everything in main.cpp if you want. and quit using IDEs you fucking faggot

>He doesn't program directly in binary

>no optimization flags
Not an argument. Kill yourself.

Also not to mention

>using at&t syntax
>using interrupt 0x80 instead of calling the c library, making the code locked to one operating system in the process

>He uses C when Ada is by far the best embedded programming language

-s is optimization. The -O flags just fuck your shit up because GCC is a piece of shit.

>instead of calling the c library
Using stdlib.h in assembly is as impure as using cstdio in C++.

Kill yourself.

Just use conio.h, user.

>He uses a Windows header to make his code more portable
How diverse is your 100% black neighborhood?

Works on 100% of PCs out there. That's portable enough to me.

If your shit platform doesn't have conio.h, just download DJ Delorie's djgpp version, pleb.

people.redhat.com/dj/

Headers are excellent for documentation.
People should read the headers, and know everything they need to know about how the stuff works and what functions they need to look closer at.

On proprietary projects, you often get a header and a shared object with the compiled software.

Good IDE's are stuff like QtCreator and Kdevelop or vim+bloat.

And you realize that you can automate this right?

Cast to void*

user@nonbloatedmachine ~ $ find /usr/include/ -name conio.h
user@nonbloatedmachine ~ $
It seems non-Noobuntu distros would like to have a word with you. :^)

conio.h is specific to MS-DOS and Wangdows.

C is a subset of c++ mostly

>he actually uses C/C++ when it's guaranteed that 90% of the shitty hello worlds he's writing would be better accomplished with a higher level language that lets you spend more time getting work done and less time micromanaging memory

Both are deprecated by Rust.

You misspelled Nim.

How can something that compiles to C deprecate C.

>temporary

At least Nim's compiler is written in Nim. Rust's compiler is written in C++.

>I don't understand how LLVM works