olli
Typing std:: is the best way to go in my opinion. I would prefer to know exactly what library I am using.
Imagine writing a template function that returns the begin() iterator for every iterable type.
Daniel
instead of link to time object?
olli
Show example ples
Imagine you have a structure like this struct Bar { Bar * begin() { return this; } Bar *end() { return this; } }; Using it an a for-range loop works fine, since it's iterable. If you want to get the start iterator std::begin works as well. —————————————- Now we got a second structure struct Foo { friend Foo* begin(Foo& f) { return &f; } friend Foo* end(Foo& f) { return &f; } }; Using a for-range loop works fine again void foo() { for (auto && f : Foo{}) {} } Using std::begin fails with error: no matching function for call to 'begin(Foo&)' —————————————————- This is not what we want, for example, we might want to implement a enumerate that basically does the same as python's enumerate, e.g. for(auto&& [idx, val] : enumerate(Foo{})) {} So we want to call the friend function for Foo but std::begin Bar, ADL is the solution by doing something like template <class T> auto beg(T&& t) { using std::begin; return begin(t); }
olli
I see. But that still isn't in the global space though?
what do you mean? Not sure I follow no function from :: is called
Anonymous
I want to learn c and c. plus
Anonymous
But i am begginer
Raul
using std::begin isn't in the global namespace of the project. Maybe you and I got confused. I was saying that using namespace std; in a global way is bad practice. However if you limit it to a scope, so it only affects that scope, then I would say that is fine.
olli
using std::begin isn't in the global namespace of the project. Maybe you and I got confused. I was saying that using namespace std; in a global way is bad practice. However if you limit it to a scope, so it only affects that scope, then I would say that is fine.
I totally agree with you on not using namespace std;. I don't agree with this statement though Typing std:: is the best way to go in my opinion. I would prefer to know exactly what library I am using.
Talula
BinaryByter
Object ORIENTED programming
Roxy
😊👍
Raul
Might be an off topic question, but does anyone know where to promote your open source project?
olli
Might be an off topic question, but does anyone know where to promote your open source project?
Depends on the project. If it's worth it you could try asking for feedback on reddit
Anonymous
I'm human not spammer
Anonymous
Thanks I'm new in programming I want to learn! Especially C++
Daniel
maybe there is no reason. But i gonna find out why that doesn't compile. I want to know why
Oluwaseyi
Sorry... Please
Mat
Sorry... Please
#ot Use that link
Muhammed
C programming pdfs
Creator
Where is?
Anonymous
☺️
Creator
Please send of fundamental programing one
Creator
Pdf
Anonymous
only speak English here?
BinaryByter
yes
BinaryByter
any other language will get you banned (‼️‼️‼️‼️)
Anonymous
👌
Anonymous
I come from China,and My English is bad
BinaryByter
Don't worry
BinaryByter
we don't ban for bad english
BinaryByter
and your english isn't too bad, actually
Anonymous
thx
olli
The cpp Reddit?
if it's a Cpp project worth sharing, sure why not?
Raul
if it's a Cpp project worth sharing, sure why not?
I mean I think it is, it's a containers library that I wrote that I thought would be super helpful for debugging.
Anonymous
I have learned the JavaScript language, I am going to learn the C language, please give me more advice.
Raul
Find a good book and start learning.
Raul
That's basically all we can say.
Anonymous
What do you think about reading a document or video?
Raul
You can't learn C by reading a document. You can probably follow a video series. But C is A LOT more difficult than JavaScript is.
Anonymous
Thanks for your advice
Anonymous
Try SoloLearn
Anonymous
Try SoloLearn
what's SoloLearn?
Anonymous
Learn programming languages
Anonymous
If you say this, I will understand.
Anonymous
www sololearn com
Anonymous
OK
Anonymous
Apps also available
Anonymous
I look
Anonymous
👍
BinaryByter
tell me which you error is
BinaryByter
what is the error?
BinaryByter
#howtoask
Elnee
Guys, can you share links on gtkmm projects (simple preferred but any is good). Need that for learning purposes. Thanks!
Mat
Gtkmm?
Elnee
Elnee
I mean repos
Elnee
Everything written in C, Vala, Python. I want to find gtkmm projects (official bindings to C++)
Prometheus
What does that even say?
Anonymous
It was a mistake
Mr. One
What do you think about reading a document or video?
Practicing is the key . Start by writing simple algorithms to understand the fundamental concepts of C programming
Anonymous
Hello everyone, guys
Anonymous
how are U
Amit
Fine and you
Anonymous
fine ,thank u
Sasuke
Doing well
Sasuke
How about u
Anonymous
are there any other informative groups like this one?
Anonymous
is this group informative? 🤔
yeah .. i like informative groups... and this one is lit
Mat
What's an informative group? 🤔