Yakov
First is .hpp, second is add.cpp and third is the main.cpp
Dima
.cxx: void Tria::print() { }
Dima
.h is good
Yakov
.cxx: void Tria::print() { }
So my function needs to be deaclared outside the class?
Dima
So my function needs to be deaclared outside the class?
yes, you never define class properties like that in your cxx
klimi
Count till you find \0 char
Yakov
Default Xcode theme
Dima
Anonymous
https://pastebin.com/fasr38aQ
Anonymous
why VolSphere giving wrong answer? with that arithmatic order?
manas
Could anyone tell me what a const function is used for? Is it similar to noexcept?
manas
Like I get what it does, but why would you need it?
Anonymous
uh?
https://pastebin.com/fasr38aQ please checkout the code I provided
Francisco
Like I get what it does, but why would you need it?
It's a class method that ensures the user that no member variables will be modified by calling that method
klimi
You have it correct
manas
It's a class method that ensures the user that no member variables will be modified by calling that method
Thanks for the reply! I just can't seem to think of a use case where I'd want to add const to a function.
Francisco
Thanks for the reply! I just can't seem to think of a use case where I'd want to add const to a function.
Also, if you have two overloads of a method, one const and the other one non-const, the overload called will depend if the object itself is const o not
NXiss7
Thanks for the reply! I just can't seem to think of a use case where I'd want to add const to a function.
Littli tip: Make const wherever you can. It'll make debugging easier, making mistakes harder, mostly, if used properly...
Artöm
And const& are all over the place
Artöm
https://pastebin.com/fasr38aQ
4/3 is 1 (int). Use 4.0 / 3
Artöm
strcpy
Mat
What?
Mat
You know the size of a number
Mat
int has its size, as long or double or...
Artöm
It works only with c-like strings aka zero-terminated char arrays
manas
Littli tip: Make const wherever you can. It'll make debugging easier, making mistakes harder, mostly, if used properly...
That's for the tip! I actually already do this, but haven't used const in functions. But, your reply brings me to another question as you've said "if used properly", when is it not appropriate to use const? 😄
manas
You cant call nonconst methods on const objects or const references
Yeah, this makes sense. Now that I think of it, I used to simply remove const qualifier as soon as the compiler prevented me from calling a non-const function from a const reference, without googling for an alternative 🤦‍♂️
Anonymous
Hello help me please I wrote all codes. Code is right but I click F9 do'nt run programm. Link fatal error
Artöm
You have function without definition
Anonymous
You have function without definition
Let me explain in detail I'm beginner
Artöm
Go on
Artöm
Or identifiers
Artöm
Better use additional source and header files
Artöm
But ok for little stuff, never ok for headers
Konstantin
Hello help me please I wrote all codes. Code is right but I click F9 do'nt run programm. Link fatal error
Project - Options - Directories/Conditionals: Include path - only $(BCB)\include;$(BCB)\include\vcl Library path - only $(BCB)\lib\obj;$(BCB)\lib Or you can try to create new project and copy your code. Firstly try to create new proj.
manas
const prevents moving
Right. So I guess const should be used everywhere it can be used.
Anonymous
Artöm
Bruh
Artöm
So?
Anonymous
Anonymous
May be programm don't play
Artöm
Stop sending screenshots
Artöm
And show error list
Anonymous
Artöm
Like I know. I never used turbo c
Anonymous
Where is it
[Linker fatal error]... maybe this is a hint? :)
Anonymous
is it Delphi ?
Anonymous
No c++ 6
Konstantin
is it Delphi ?
It is Borland C++ Builder
bnoginshkq
Can anyone explain me how to block proxy .. i already searched on Google but m not satisfied with th results.. pls help me.
bnoginshkq
But why?
klimi
you can not detect it if they just use some pc they infected with malware and use it as proxy you will see them as the pc not the actuall person
bnoginshkq
Thn tell me how to stop unknown proxy request on server?
klimi
no idea what that is
Dima
#ot
Anonymous
I knew programm don't work please send me c ++ setup with crack
klimi
@neko_cpp you need to see this
Dima
Bruh
klimi
klimi
OH
klimi
HE MEANT THE DRUGS
klimi
now it makes sense
Dima
he is already high
Anonymous
Do you have c ++ setup