🐉
Where is the code?🤔
I think you can skip the reading of class Strumento.
Also, the negozio.h is something already given like this, not written by me but by my professor
Anonymous
🐉
I'll write it here
Anonymous
Yep
🐉
negozio.cpp:82:19: error: no declaration matches 'const Strumento& Strumento::operator const'
const Strumento & Strumento::operator const
Anonymous
🐉
seems so
Anonymous
Actually I dunno what error is
Anonymous
Try to change getPrezzo return type to just float
Anonymous
const& for float doesn't make sense anyways
🐉
This is the second time I hear this thing about float not needing const
🐉
But Still dunno why
Anonymous
Because const& is used to avoid unnecessary expensive copies
Copying of float is not expensive and const& can ruin some advanced compiler optimizations
🐉
Oh that's why
🐉
Hey man, could it be that I got wrong the Snipset of negozio.cpp
🐉
Noticed it now
@
Hello everyone. Can you create a timer and stop it when entering a specific option, and if I don't stop it, another specific command will be executed and I want the method please. I just finished the c ++ course
Anonymous
🐉
I'm an ape lol. I was using Studente:: inside of Negozio
Anonymous
@
@
🐉
I'm not quite sure if it's possible, I know there is a library related to time
Anonymous
🐉
Ctime maybe?
@
I made the timer, but I can't control it
Anonymous
Ctime maybe?
No, don't use C if there's a good option in C++
Anonymous
🐉
The timer should be a difference from the start until the stop
@
Yup
@
I will try thank u
🐉
like start at 18:37:06 ends 18:38:09 and then the difference between them, probably there is some function in <chrono> library
🐉
We could help if you send us your code maybe
@
Anonymous
@
I will try it
🐉
Maybe for an easier approch ctime would be better
Anonymous
Anonymous
using namespace std::chrono;
start_time = high_resolution_clock::now();
...
end_time = high_resolution_clock::now();
auto time_in_ms = duration_cast<millisecons>(end_time - start_time);
Anonymous
Anonymous
Anonymous
Specially if you're masochist 💦
🐉
Whenever I see _ and < > I get confused lol
Anonymous
🐉
Cause I never used any library using these characters
🐉
Starting using vector maybe I will get used to them
Anonymous
It's strange, but for me is usually hard to read someone else's code
Anonymous
But in Perl I have no trouble reading code xD
Anonymous
Yeah, guys, if you want to talk offtop, go to #ot
M. Ahsen
hey im a beginner in C refer me a good tutorial to enhance my coing skills☺
Anonymous
M. Ahsen
is there any video tutorial😊
klimi
M. Ahsen
im asking is there any video tutorial on C language
Anonymous
Specially if you use the youtube filters to search channels or lists
M. Ahsen
k thanks
Anonymous
k thanks
Not checking your problem in google (or any other search engine) first will get you a warn.
M. Ahsen
did'nt know about it next time i will be careful
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
void* is such a cool feature, not error-prone at all, yeah?
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Rust maybe is a good language to replace C, not C++
Anonymous
Fanboy
Of course C++ is not as modern as it could be
There is no networking in standard for now :( And other good stuff...
🐉
🐉
coding is fun
🐉
isn't the default constructor called whenever you create something?
Anonymous
Also aggregates