Ludovic 'Archivist'
Just that C is less forgiving to mistakes than Go is
Palinuro
sorry
Anonymous
We are c++ guys and prefer c++
Ludovic 'Archivist'
golang has one specification and one reference implementation, and both are pretty easy to understand, even if the underlying concepts were extremely difficult to design
If you look at a well made standard library for C (aka not glibc) you should find it very simple in implementation, but if you can understand how the GC of Go exactly works you have gone a good step in mastering both Go and C
Ludovic 'Archivist'
Anonymous
Me, *looking at my variant types*
Lol, what's there?😂
Anonymous
Go-like error codes?
Ludovic 'Archivist'
Lol, what's there?😂
Something in need of a divine std::visitation
Ludovic 'Archivist'
Go-like error codes?
No, error types
Ludovic 'Archivist'
yeah, i'm pretty scared by glibc (as much as llvm)
Go look at OpenBSD libc (requires to take a look at OpenBSD too tho)
Anonymous
Did you know that C standard library in Android is written in C++?😂
Ludovic 'Archivist'
Did you know that C standard library in Android is written in C++?😂
Well, why would it not be. I mean it is just a language
Anonymous
Just an interesting fact
Ludovic 'Archivist'
C++ is safer than C so that is not a surprise
Ludovic 'Archivist'
I mean, you can write self sanitizing C++ code, good luck with making dependent types in C
Palinuro
well, i personally believe that a specific subset of the most modern cpp standard is waaaay better than any other programming lancuage, but unfortunately there is so much old code around and too many people know older cpp standards. between c or cpp i still prefer c for personal reasons that are more emotional than technical, because for serious project i would probably use rust or golang (or both)
joel
maybe I'm blind but I see c files
Anonymous
send evidence
It is based on Antony Polukhin (active member of C++ standard's committee) words
Palinuro
by the way, what book do you suggest to learn the latest cpp standard? because the only entry level books are about older standards, and the only books referencing the new standards are books written for advanced people with experience with older versions of cpp
Anonymous
maybe I'm blind but I see c files
Well.. it's not an official implementation
joel
welp
Anonymous
And there's a good book (as I heard) by Nicolai Josuttis on c++17
Anonymous
There's a good introduction to modern c++ (11 and 14 standard) by Scott Meyers — Effective modern c++
It doesn't cover all of the new features of modern c++ But it covers a lot. And your code will become much clearer and less bug prone
Anonymous
Personally I like watching talks from CppCon, C++ Russia, etc
Anonymous
You are talking about C++, not C. They are very different languages. C++ is already 21 years old (by official standards).
I was talking about C, but I'd make the same claim about most languages -- including C++ moreso than C, as you said. We might have different perspectives of what mastery is, since it tends to be an ambiguous term.
Anonymous
I was talking about C, but I'd make the same claim about most languages -- including C++ moreso than C, as you said. We might have different perspectives of what mastery is, since it tends to be an ambiguous term.
C is maybe hard for a newbie, but is not as big as C++. And I think you can master C completely, but the only C is pretty useless because there're a lot of features beyond the standard — curl, pthread and others
Palinuro
There's a good introduction to modern c++ (11 and 14 standard) by Scott Meyers — Effective modern c++
i have its italian edition, but as i said it is one of those books designed to teach cpp11 amd part of cpp14 to people that van be considered experts in thr previous versions of the standard. imagine being a university professor, and you don't want to teach your students old and unsafe shit, what text book would you adopt?
Palinuro
nowadays to write a good and safe cpp you have to learn 20yo cpp, master it and then upgrade. for a newcomer it would be way easier (and productive) to just study another compiled and efficient language like rust
Anonymous
Recommended by many C++ experts*
Anonymous
Such as Bjarne Stroustrup
Palinuro
No The recommended way is to learn new stuff firstly and then dive into old shit
this is the best and most natural way to do that but tell me, does a beginner book that starts with the latest standard and a modern approach even exist?
Anonymous
this is the best and most natural way to do that but tell me, does a beginner book that starts with the latest standard and a modern approach even exist?
Yes For example, C++ Primer Plus. But it covers C++11 stuff only. But for a beginner it is more than enough
احمد
Ok
Anonymous
can i ask a JAVA question here?
Anonymous
"* C/C++ discussion preffered (assembly also allowed), asking about other languages (or groups for other languages) right after joining will get you BANNED."
Anonymous
This is why it's important to read the Pinned Post and especially Rules of a group when you join.
Anonymous
copy that!
Ludovic 'Archivist'
Yes For example, C++ Primer Plus. But it covers C++11 stuff only. But for a beginner it is more than enough
Well there is still some santa summoning machinery at play when manipulating strings *glares at the faucet interfaces* but we can live without selling thy soul to the devil
Anonymous
yes
MᏫᎻᎯᎷᎷᎬᎠ
Tbh Learning Rust teaches you a lot in C++
MᏫᎻᎯᎷᎷᎬᎠ
In SHORT time
MᏫᎻᎯᎷᎷᎬᎠ
Because What is considered a good practice in C++, is a MUST in Rust
MᏫᎻᎯᎷᎷᎬᎠ
The compiler will prevent you from writing stupid things
Anonymous
Hi
Anonymous
Hu
rex
if the input is placement then i want an output like e em eme emen emenp emenpl emenpla emenplac
just use bubble sort technique and take the starting no as middle of the string
Harvey
Hello
Mat
Too fast
Dima
What these retards are
I_Interface
Renan
Hello, people! 👋
Anonymous
Anyone knows about system calls? (linux)
Dima
Anyone knows about system calls? (linux)
Drunk some beer with these guys, good ones
Anonymous
XD
Anonymous
On a serious note, how do you pass floating point numbers as arguments when adding a new system call? If someone has any idea
Anonymous
I'm running a code in terminal and it is giving me the desired result but when I try to submit it to hackerearth, it is not giving any output.
Anonymous
and not even producing any output on codechef ide
Anonymous
Well, where is the code?
Anonymous
Well, where is the code?
I figured out something but want to guess whether it is right or not. I was using scanf and printf together with cin and cout. Should that cause any problem?
Anonymous
No
Anonymous
do i need to include other than iostream for scanf and printf?
Anonymous
it's a cpp code.
Sumit
do i need to include other than iostream for scanf and printf?
For using scanf and printf you use stdio.h ...iostream is for cout and cin
Anonymous
For using scanf and printf you use stdio.h ...iostream is for cout and cin
I used a non-standard library bits/stdc++.h and wondering whether it was in there.
Aasif
what does fgets (input, 78, stdin) mean?
Amit
what does fgets (input, 78, stdin) mean?
char *fgets(char *str, int n, FILE *stream) Parameters str − This is the pointer to an array of chars where the string read is stored. n − This is the maximum number of characters to be read (including the final null-character). Usually, the length of the array passed as str is used. stream − This is the pointer to a FILE object that identifies the stream where characters are read from.
Anonymous
Guys, I am an absolute beginner in opengl.. I am learning a book called learnopengl . To draw a box he specified about 36 coordinates. Now I understand this perfectly. I want to draw a cylinder. What should I do. Should I specify all the coordinates or what exactly. Please help
Anonymous
Mity
Guys can you tell me to allocate dynamic memory in c for string