Anonymous
Are you familiar with if else loop?
Yes ... My problem is how to deal with , usin arrays or sth else
Mat
Think about how you'd do it
How would you resolve the problem, not the implementation
Shivam
You need to understand its logic
Anonymous
Mat
As I think it's basic of learning a programming language
Yeah, but you're not asking how to implement it
Mat
You're asking the logic behind it
Mat
And it's not about programming. Not strictly
Mat
As an example, you need at least a piece of your algorithm dealing with reading an input, and another one with output stuff, so: 1. Read input 2. ... 3. ... ... N. Print output
Shivam
Oops
Anonymous
Thanks but I think you deleted it moment ago
Mat
No code here
Shivam
No code here
Sorry my mistake
Mat
We're not sending people code
Mat
:)
Shivam
Mat
Then you need to remember the input, so: 1. Read input 2. Store input 3. ... ... N. Print output
Shivam
There are so many tutorials out there
Anonymous
We're not sending people code
No problem ... Law is law everyone should respect it ....
Anonymous
Anonymous
🌹
Mat
Yes yes ... Huge thanks to you all
With the algorithm, we'll help you find how to implement it in C or C++
Anonymous
With the algorithm, we'll help you find how to implement it in C or C++
And a question !? Writing code here is totally banned ?! Or can I write it step by step with your helps ?!
Mat
Like A: Hey i need code for this fast B: <code>
Shivam
?
Is array really different from a linked list?
Shivam
As they both have literally same size?
Shivam
Totally
Can you explain?
Mat
Arrays and lists
Shivam
But the insertion and deletion process is almost same in both of em
Shivam
Good job
Mat
You can't insert something in an array
Mat
And you can't delete a position in an array
Shivam
Ohhh
Shivam
But is array has any limit?
Mat
But is array has any limit?
They have a static memory allocation
Mat
What you allocate when you create one of them is its final size
Shivam
Ohh i get it now
Shivam
Thanks @Occupato
Shivam
Gn
klimi
Gn
Mark
soo uh
Mark
first day on visual studio and windows api:
Mark
what the fuck
Mark
i want to listen for power-related events
Mark
i found a way how to create a event listener
Mark
but i have no idea how to register it
Mark
https://0x0.st/sIou.png
Mark
any ideas?
klimi
I'm too young to die
Shivam
I'm too young to die
That doesn't matter as life is just full of illusions
Mark
indeed
Shivam
?
Nvm, you're too young to understand it xD
klimi
Prometheus
I was having that issue last night as well. Did some research. Haven't tested this out yet but the answer seems to make sense. I'll be trying it tonight. Hope it helps you. https://stackoverflow.com/questions/4108313/how-do-i-find-the-length-of-an-array
Roxifλsz 🇱🇹
I think sizeof() is only evaluated at compile time
Roxifλsz 🇱🇹
I think sizeof() is only evaluated at compile time
So if you have an array, which is allocated at run time, it won't work
olli
It doesn't work on pointers, that's it. void foo(int x[]) {} is the same as void foo(int * p) {} so sizeof(p) equals sizeof(x) and sizeof(void*) which is clearly independent of the array size. Depending on your compiler, a warning is generated 'sizeof' on array function parameter 'arr' will return size of 'int*'.
Vishnu
Which IDE
Prometheus
May be wrong but it looks like code blocks to me
Vishnu
Hmm
Saurav
Can anyone send link of turbo c++ for both 32 & 64 bit
Shivam
Ask Google bruh
Saurav
#cpp
Saurav
Ask Google bruh
Googled it but the file is not supported in my pc
Shivam
Shivam
Maybe you can try CodeBlocks IDE, it works quite good.
olli
I still don't get why so many people seem to be obsessed with TurboC++? The latest version has been released in 2006. This Software is even older than Windows Vista. We have 2018, C++ 17 has been released and big parts of the standard are available in Compilers such as Clang, GCC and MSVC. Two of them work on all major platforms and are open source. Why should one choose TurboC++ instead?!