I_Interface
Can anybody please tell me approach ,i am getting wrong
Find the sum of 2 nums in array what is less than k and closest to it
Fabio
Talula
Can anybody please tell me approach ,i am getting wrong
Make 2 loops one from 0 to max number of values in Array and other from 0 to value of first one... Select number using first loop, then move through the array and add the number in the array... If the number is +2 -2 select it as the answer, if not ignore... store the results in other array...
Talula
Use i++ or something to increment the storage of information in new array.
I_Interface
But u will have an array with possibly n! sum
in task says "print any one", so it's not important
Anonymous
class base{ public: static void fun() { cout<<"base static\n"; } }; class child:public base { public: static void fun() { cout << "child static\n"; } };
Anonymous
Is this called overriding the static method "fun()"?
Pavel
Is this called overriding the static method "fun()"?
They're not overriden, these two still are separate functions, and the function that will be called will be chosen at compile time.
Dima
Lol
Anonymous
I_Interface
Not using like that.
then don't use static, just void fun() { ... }
I_Interface
What is this called then?
and if u want to a call child method, u must override a base method
Anonymous
then don't use static, just void fun() { ... }
someone asked me if that can be done or not
Anonymous
No real intention to do anything like that.
Anonymous
*intention I meant
I_Interface
No real intention to do anything like that.
in this case base method should be as virtual, not static child method must have override key word
I_Interface
Is this called overriding the static method "fun()"?
then it will be called "overriting"
Swa
/rules
I_Interface
olli
virtual is enough ?
Yes, although override is recommended because it ensures that the function is virtual and is overriding a virtual function from a base class Override has only been added to C++11
KK
KK
Output??
Anonymous
return of the get
Anonymous
and the outputs
KK
Nope
Mat
Mat
Damn, try to have at least a readable format
KK
Okk no problem iwill snd again
KK
W8
Mat
And read the rules
KK
Mat
Nothing changed
Mat
And, again, read the rules
Mat
Moreover what's the point about asking what your code will produce? Run it!
KK
I m getting b=0
KK
Bt y
Mat
Bt y
Write clearly. Not y, but why... And so on. Reformat your code to something readable
jack
put the code with good brace positions
jack
only allign those braces which shows opening and closing of the same method , class etc
KK
Mat
Line 4 5 6 are okay
ROCKS
Hlo
ROCKS
Can anyone tell where to find a complete guide of c++
ROCKS
Or any tutorials
MᏫᎻᎯᎷᎷᎬᎠ
https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
Anonymous
Can anyone tell where to find a complete guide of c++
I would suggest Ivor Horton c++ books
Rohit
/
Anonymous
So there's no complete guide
Ariana
No one knows c++ completely
compiler devs be like
Talula
No one knows c++ completely
Other than Trump...
Anonymous
On google i readed i have to change build setting restoring the default setting,i did it yet
Anonymous
Thanks for the context
Anonymous
Thanks for the context
It was an hello word
Anonymous
1. Don't use CodeBlocks
Anonymous
2. Pictures of screen are disgusting
Anonymous
1. Don't use CodeBlocks
Ok,what should i use
Nikita
Why not?
Anonymous
Anonymous
Ok,what should i use
Visual Studio, CLion or Qt Creator
Anonymous
Visual Studio, CLion or Qt Creator
At my university we use all codeblock
Anonymous
I have a bad camera
They are disgusting no matter what camera you have
Nikita
Codeblocks is not that bad
Anonymous
I_Interface
Codeblocks is not that bad
Borland is not bad too ?
Nikita
It has enough settings to create comfort gui
I_Interface
It has enough settings to create comfort gui
but Visual Studio and CLion are more comfortable and useful lol
Anonymous
Ok i start to use visual studio
Nikita
Its very simple ide and tge main audience is not powerful computers and laptops
Nikita
You simply can achieve the same results
Nikita
Visual studio and Clion are not for beginners
Nikita
Because it has been created for professionals
Nikita
Not amateurs
I_Interface
Visual studio and Clion are not for beginners
But what is the problem go for articles or video guides?