🐉
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
🐉
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
🐉
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
🐉
I'm an ape lol. I was using Studente:: inside of Negozio
🐉
You can create for sure We won't do it for you
I think he's just asking if it's possible
@
You can create for sure We won't do it for you
I don't want it, I just want a hint😁
🐉
I'm not quite sure if it's possible, I know there is a library related to time
🐉
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++
@
Use std::thread
Thank you pro ✌🏻
Anonymous
I made the timer, but I can't control it
It's not a valid question anyways
Anonymous
Ctime maybe?
<chrono>
🐉
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
like start at 18:37:06 ends 18:38:09 and then the difference between them, probably there is some function in <chrono> library
Yep You just can store start time point, then store end time point and then substract them
@
I will try it
🐉
Maybe for an easier approch ctime would be better
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
Maybe for an easier approch ctime would be better
C is old and error-prone language
Anonymous
Specially if you're masochist 💦
🐉
Whenever I see _ and < > I get confused lol
🐉
Cause I never used any library using these characters
🐉
Starting using vector maybe I will get used to them
🐉
Try to read Perl
I prefer brainfuck
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☺
M. Ahsen
is there any video tutorial😊
klimi
is there any video tutorial😊
what kind is this question
M. Ahsen
im asking is there any video tutorial on C language
Anonymous
is there any video tutorial😊
Search youtube "c tutorial" and you're set
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
C is old and error-prone language
C is not old, the latest standard is ISO-9899:2018. C is error-prune ONLY for those who never read the documents.
Anonymous
void* is such a cool feature, not error-prone at all, yeah?
Anonymous
C is not old, the latest standard is ISO-9899:2018. C is error-prune ONLY for those who never read the documents.
Documentation and code comments have this nice feature.. to stale, to expire.. so they do not relate to reality
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?
Igor🇺🇦
isn't the default constructor called whenever you create something?
Not everything in C++ has a default constructor. For example primitive types
Anonymous
Also aggregates