Vladimir
I'm not talking about not using c++ vectors and strings, in general it's a bad idea.
Ludovic 'Archivist'
You have C in a core and a bunch of features from c++ bulit upon in the 20-year range. You're free to choose what feautures you do and do not like to use. Noone use 100% of c++
I am talking about teaching. It is more healthy to teach C++ way of doing things before teaching the C way so that they actually memorize the C++ way
Ludovic 'Archivist'
Vladimir
C-strings being better? Make me laugh in strlen
Fixed message, I'm against c-strings in c++
Ludovic 'Archivist'
Fixed message, I'm against c-strings in c++
Oh yeah, but there is not only that. You don't want your new C++ devs to use qsort, printf, sprintf, and most of that stuff when writing C++ or handling raw pointers everywhere a unique_ptr would have been what they wanted
Vladimir
You can't write c++ and don't deal with pointers and memory stuff, it will pop out here and there. Better know how to work with it
Anonymous
Hi guys.. can anyonce here tell me easy guide to c++ STL? I am comfortable with c
Ludovic 'Archivist'
Anonymous
STL died in 2003, what you mean is standard library
Is that they use is competitive coding? Then that😅 i knw the basic syntax of c++ bt can't understand / read any solution from them
Vladimir
But that should never be the starting point
I'm not good in teaching. I think there're different ways to teach and a lot depends on the teacher.
Anonymous
Video guides then
Anything on mind?
Ludovic 'Archivist'
Proof?
https://stackoverflow.com/questions/5205491/whats-the-difference-between-stl-and-c-standard-library
Anonymous
Is there any good book for c?
Ludovic 'Archivist'
Is that they use is competitive coding? Then that😅 i knw the basic syntax of c++ bt can't understand / read any solution from them
No, it is just that the STL was a thing written in 1994 that was later pushed into the C++ standard library
Ludovic 'Archivist'
Ludovic 'Archivist'
Let now not use linux and use gnu/linux instead. Who cares?
Well you are free to use GNU or not, I personally am slowly removing it so...
Ludovic 'Archivist'
You can use Linux with pretty much any posix OS
Ludovic 'Archivist'
I think that you can run most of openbsd's os on Linux if you remove pledge calls
Anonymous
WHAT are ostream and istream in c++ and how are these related to << and >> operators and what is cin and cout?
Vladimir
I don't want to flood about linux, I just mention it's a terminology problem
Anonymous
Can anyone help?
Ludovic 'Archivist'
I don't want to flood about linux, I just mention it's a terminology problem
Well you can still use the literal SGI STL if you want to live in pain
Ludovic 'Archivist'
Ludovic 'Archivist'
They plz guide to learn that🙏
What you want to learn is the Standard library, but I advise that if you know C, you learn C++ first
Anonymous
What you want to learn is the Standard library, but I advise that if you know C, you learn C++ first
I learned it & can do programs with it. But when it comes to competitive coding... the solution/tutorials does nt make sense syntx wise :(
Vladimir
I think pic is better, arg says nothing
I_Interface
don't forget return a string :)
Anonymous
I read that the overloaded operator>>() is a member function of istream. So what is >> alone without operator written before it?
I_Interface
all vars must be named what they mean
Vladimir
Why you need another var for arg?
I_Interface
it's a good sign of programming
I_Interface
use some prefix or postfix
Anonymous
Send an example of it please
Foe example is (vector) (forgive the brackets i am hsing ph) in c++ or c++ SL
Vladimir
I don't understand
I_Interface
for param mb some "p_num"
MᏫᎻᎯᎷᎷᎬᎠ
https://www.reddit.com/r/cpp/comments/cfk9de/201907_cologne_iso_c_committee_trip_report_the/
Anonymous
The operator⸮
What does that mean?
I_Interface
What does that mean?
operator "?"
I_Interface
What does that mean?
it means like operator "if"
Anonymous
how is >> related with the istream class?
I_Interface
how is >> related with the istream class?
http://www.cplusplus.com/reference/istream/istream/operator%3E%3E/
I_Interface
this->number = number;
Vladimir
I think you forgot 'this'
Dima
it’s a keyword
I_Interface
const ptr for ur object
Vladimir
This is address of class instance
I_Interface
it’s a keyword
or it's not const ? don't remember
Anonymous
const ptr for ur object
Not necessarily const
Anonymous
Depends on how object was created
Anonymous
It is T* const probably
Anonymous
You should learn, not hear
Anonymous
What's the book?
Mihail
This technically works, because of variable shadowing (if you enable -Wshadow on gcc/cfe you'd see a warning), but better not do it, because it's confusing when the class is big
Anonymous
It is T* const probably
And if object is const itself, then T const * const
Mihail
You could use an m_ prefix for member variables
Mihail
That's a common practice with classes/structs
Vladimir
That's a common practice with classes/structs
I heard it's obsolete and not recommended
Vladimir
Compiler knows what's member of what
Anonymous
Mihail
I heard it's obsolete and not recommended
If that's obsolete, then what isn't?
Mihail
Compiler knows what's member of what
Yes, but it simply starts to get confusing with a lot of member variables
Vladimir
Chromium uses it, for example
Chromium in many cases not checks malloc return, and what
Mihail
Chromium uses it, for example
libstdc++ or libc++ use it. Don't remember which one, maybe both
Mihail
And I've seen it in lots of places, so it's really common
Abdul
Hi
Vladimir
Ok, I won't argue
Anonymous
Hi
nohello.com