you can't even write procedural/functional code in C#
Thomas Allen
>Not even the guys that write the C++ specifications the compiler guys use can even write basic hello worlds that don't leak memory. citation needed >better use C dropped there is so much legitimate criticism you can pull on C++ and you chose to make yourself look retarded
Luis Bell
#include
int main(void) { std::cout valgrind --leak-check=full ./foo
==6289== Memcheck, a memory error detector ==6289== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==6289== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==6289== Command: ./foo ==6289== ==6289== ==6289== HEAP SUMMARY: ==6289== in use at exit: 0 bytes in 0 blocks ==6289== total heap usage: 2 allocs, 2 frees, 76,800 bytes allocated ==6289== ==6289== All heap blocks were freed -- no leaks are possible ==6289== ==6289== For counts of detected and suppressed errors, rerun with: -v ==6289== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
I'm the best C++ programmer on earth. Where's my 10-figure pay check?
*stolen* Lelelelelelle now give me my 10 figure paycheck
Dylan Torres
>>void parameter Correct way to do it.
>>std::endl Correct way to do it (if anyone should be blamed, it's Bjarne).
>>not capitalizing Hello As was done in the original hello world by Kernighan (should have even dropped the exclamation point).
Brody Cox
C stands for Chad C++ stands for Cuck++
Luke Johnson
Use the features C++ adds that you actually like, ignore the rest.
Brandon Rodriguez
>>>void parameter >Correct way to do it. In C it is, but it's pointless in C++.
>>>std::endl >Correct way to do it (if anyone should be blamed, it's Bjarne). std::endl is widely known to be inferior in every way to '\n'
Jordan Cooper
aka C++++
Jacob Walker
When I have to use C++, I just use it like its C but take advantage of the things already implemented (i.e. vectors, sorting functions, strings...) I know its wrong, but I can't help it.
Tyler Howard
It's correct helloworld program with well-defined behaviour so stfu.
==12904== Memcheck, a memory error detector ==12904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==12904== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==12904== Command: ./foo ==12904== Test ==12904== ==12904== HEAP SUMMARY: ==12904== in use at exit: 0 bytes in 0 blocks ==12904== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated ==12904== ==12904== All heap blocks were freed -- no leaks are possible ==12904== ==12904== For counts of detected and suppressed errors, rerun with: -v ==12904== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Jason Cook
>C++ guys are even arguing about the implementation details of 'hello world' >can't make this up
Cooper Gomez
>int main() { FUCKING KILL YOURSELF HOLY SHIT WHY DID YOU DO THAT I ALMOST WENT BLIND YOU FUCKING FAGGOT
Hudson Howard
I had int argc, char **argv in there but took it out so -Wall wouldn't bitch about not using it. Normally I have the same reaction.
Lucas Edwards
I was talking about that curly brace.
Jose Bennett
>C++ faggots can't even write a hello world without arguing lmao
Jordan Reed
In that case, there's no issue.
Nathan Price
...
Nathaniel Wright
1TBS you faglord.
Ethan Butler
jailang will annihilate c++ on day 1, just wait for it
Christian Morales
it will take months for solid libraries bindings and porting crypto and protocols
Jaxson Sanders
But I like my templates, how else am I going to feel smart if I can't do magic like CRTP, higher kinded templates and expression templates?
Henry Thomas
>not K&R elder prestige race of the ancient master gods
Nathan Taylor
do it yourself, you could be waiting forever
Gabriel Lewis
not sure I would want to use my own tls/https library if I knew what kind of idiot made it
Noah Brown
CEASE AND DESIST ALL POSTING OF PINK WOJAK. THIS IS BLATANT BOARD CULTURE APPROPRIATION. YOU HAVE BEEN WARNED
Noah Harris
watchu gonna do /biz/boi, killed yourself after ur buttcoin crash yet?
Ethan Allen
But can you write a program that writes 1TB of "hello world" into a text file?
Levi Parker
...
Nicholas Ortiz
t. brainlet who is too dumb for C++
It's not fucking rocketscience
Juan Campbell
Agree. It was already bad though. Adding complexity doesn't fix a bad language.
Cameron Evans
C++ should've stayed C with classes.
Robert Mitchell
humanity needs to ditch header files already
Carter Williams
c++ is not shit.every c++ tutorial out there without exceptions are shit tho.they shouldnt teach the old unsafe (c-way) of doing things . instead of teaching const,they should teach constexpr instead of teaching enum,they should only teach enum classes instead of teaching c-style explicit cast,they should only teach static_cast() instead of teaching old c-style arrays,they should only teach std::array's(they also know their size,and have debug time bound checking).
these are all smarter,safer and easier to use than their c inherited counterparts and they are the exact same speed.
Joshua Cox
you dont need to flush all the time,and endl is many times slower than '\n'
Samuel Morris
there is some other way then learning C++ against CppCoreGuidelines?
Luis Ortiz
to be honest thechernoproject on youtube has the only good c++ tutorials from what ive seen so far.
Jordan Turner
They're not so much tutorials as they are explanations and discussions of C++ features, what makes them good (or bad), where you would use them, etc.. That's why his videos are good, and that's the stuff you can't find in standard tutorial videos/writeups.
Hunter Ward
You do need to flush at the last one though. Jeez people here get so fucking salty when C++ is mentioned. Hmm... it's like nobody ever did anything besides Lisp fizzbuzz and is a completely unemployable wimpy faggot. Really makes me think.
Jaxon Nguyen
Make them unnamed params and the warning will be gone.
This is how I deal with unused params in functions derived from pure virtuals. Beats an unused macro or attribute imo.
Aiden Evans
Jailang is a language designed for gaymes. Rust is already thousand times better and is a viable replacement for C++. Jailang is nothing but a meme language.
Matthew Green
Rust is a language designed for snowflakes. C++ is already thousand times better and is a viable replacement for Rust. Rust is nothing but a meme language.
Joshua Clark
Go back to python pajeet. Clearly you are not smart enough for to use C++.
Ethan Wood
C++ doesn't replace Rust, it existed before Rust. you fucking numbnuts.
Also, how is C++ is thousand times better than Rust if it can't handle errors and memory leaks. You clearly don't know what you're talking about.
Go back to playing your gaymes >>Sup Forums
Colton Watson
>Also, how is C++ is thousand times better than Rust if it can't handle errors and memory leaks. Then don't write leaky code. This is the fundamental flaw with "safe" languages. You're hoping that the computer is smarter than you, however the fact of the matter is the real solution is to not be retarded.
Sebastian Anderson
You're assuming that everyone is perfect and will always write bug-free code. You're forgetting that there's poo coders. We keep finding many security vulnerabilities like Heartbleed due to those coders who keep making mistakes in flawed language. Why bother using a language that fucks you over. Why not just use a language that does a better job at catching errors that might save a lot of headaches.
Bentley Wright
>linus said C is better than C++ so it must be true
Caleb Carter
>Why not just use a language that does a better job at catching errors that might save a lot of headaches. We do. It's called C++.
Jack Sanchez
He likes C because using it keeps the second-rate C++ coders out. Also finer-grained control over system-level crap.
Jordan Nelson
Can it catch bugs that can cause memory leaks, threads deadlocking, etc at compile time? No it fucking doesn't, you fucking brainlet
>Can it catch bugs that can cause memory leaks If you correctly put your new and delete in constructors and destructors like a sane person and catch exceptions, you'll never have this problem.
>threads deadlocking Some can be caught at runtime, otherwise you can just go to an engineering school that will teach you how to program correctly instead of learning poorogramming on dinesh-java.com.
Elijah Taylor
rust can detect deadlocks at compile time? please tell me more
Colton Perez
What's with all the talk of memory? Has everyone forgotten about RAII?
Dylan Hernandez
Why bother doing all that if there's a compiler that can do all of that at compile time. Boom, no need to test at runtime. If you had any education at all, you'll know that finding bugs at runtime are not reliable at all especially deadlocking, deadlocking varies greatly on different computers with background programs. Also I've noticed that your flawed brain keeps assuming that everyone is infalliable. People make mistakes all of the time. They may fuck up something at constructor/destructors or fuck up with pointers and this will be checked out OK by C++ compiler while in Rust, compiler will catch it. Seriously, what are you, a literal retard poocoder?
Robert Garcia
You know how people is, they tend to make mistakes and fuck up their RAII procedure.
When I said deadlock, I was thinking of data races. Despite that, Rust still catches more error than C++ compiler can and ensures no memory leaks in your compiled program. C++ can't do any of that at compile time.
Cooper Butler
1. No. 2. >He still memes about SJWs taking over tech several years after that stopped being a funny meme and after GamerGate died
Alexander Watson
put void there you mong
Samuel Bailey
>Sup Forums faggots can't even write a hello world without arguing ftfy
Dylan Clark
>When I said deadlock, I was thinking of data races. >If you had any education at all
Jaxon Long
Does Rust do that?
Levi Wilson
Yes, except the deadlocking part
David Turner
I made a mistake but you're way less educated if you doesn't think Rust is any advantageous than C++.
Luis Perry
>C++ is a dog pile of shit.
It absolutely is. Typing "std::" over and over again is a good way to get bugs.
Landon Cruz
>you're way less educated if you doesn't
Isaac King
What's >using namespace std;
Brody Powell
(You)
Ryan Myers
Is Rust associated with SJWs or something?
Kevin Hughes
Its just NEETs who likes to label "SJW" on everything they don't like
Landon Wright
The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. -quote by someone I dont remember
Nolan Rogers
Of course it's not. It's not as if the company that made Rust gave money to a fascist cuckold militia.
Caleb Hall
It was literally created because Mozilla couldn't find diversity hires that could do C++. Since the leftists didn't like the idea of hiring white people, they created a language that was friendlier to throwbacks in evolution.
Grayson Butler
(((sources needed)))
Aiden Richardson
>using namespace "std"
Owen Miller
Choosing C over C++ completely categorically is like avoiding herpes by opting for permavirginity.
Any reasonable subset of C++ that's visibly larger than C itself would be a poor choice for a kernel, but that doesn't mean that virtually every element of the C language and compilation/ABI model could not have been improved upon drastically, if not for C's overwhelming incumbency in systems programming.
Gabriel Nelson
Reality is the source.
>Go outside >Look up at sky >Say I see clouds >Hurrr source that This is what you sound like.
Kevin Clark
Interesting how you completely avoided answering my request by spewing that drivel. It's clear that you know nothing and are pulling things from your ass.
Cameron Peterson
>Reality doesn't exist The state of leftism and their war on facts.
Matthew Robinson
wow, "lefies" and "war on facts" paired with cherry-picked facts, nice argument! You really has blown me away. Golden star for you