Mohit
I m beginner . Can anyone help me
Mohit
Anyone please??
Benjamine S.
Mohit
I m good bro
Mohit
Can you help me?? Talpa😇
Temur-Malik
so hello
Temur-Malik
admin u have channel c/c++
Temur-Malik
?
Temur-Malik
if u have can u throw the link
Dima
Lol
Temur-Malik
Speak in russ?
Dharan
Can anyone teach me dynamic programming?
Dharan
Marián
can i somehow remove #define with g++ compilation flags?
Marián
this doesn't work for some reason
Anonymous
Marián
oh k thanks :D
Anonymous
In c++ using new keyword we use dynamic memory allocation, but in that case I used array with index size 3 and when I use above 3 index their is (array index out of bound I expect) but no error found
Anonymous
Refer above code
Ashish Bhushan
Remove it
Ashish Bhushan
Or you will get a warning from admin
Anonymous
I_Interface
/warn install telegram desktop and make a normal screenshot or use pastebin.com for your code.
Anonymous
Okay
Anonymous
Anonymous
This happens because you have enough memory available on your ram
Anonymous
Explain me in detail
Due to this when you try to access next index which is not declared it allows bcs the mory is free
Anonymous
As you know array stores element in a contigious way
Anonymous
Anonymous
Anonymous
It's drawback of c
Anonymous
Named as memory flow
Anonymous
Same code not excute in java
C doesn't check for array bounds. the job is delegated to the programmers. either you can use the array properly and make sure that there are no out of bounds accesses, or take a performance hit and use a library that implements a container with bounds checking.
Anonymous
it's all about trade-offs
Anonymous
https://github.com/stephenrkell/libcrunch
The medium-term goal is ... performs usably well (hopefully no worse than
half native speed, usually better).
Anonymous
Or just use C++
Anonymous
Anonymous
Lieutenant
Can anyone guide me as to how I can write a program in C that cns apply a subnet mask on an IP address?
Lieutenant
That can*
Lieutenant
I know and understand how to use htonl and ntohl, and the inet_pton, inet_ntop functions to manipulate the string IP address and the binary form of IP address
Lieutenant
But I can't think of how to manipulate the bits of binary for of IP, so as to apply any subnet mask
Lieutenant
Basically, I can't figure out "what" to AND with the binary IP address
Asdew
Lieutenant
*actually ignore the word CIDR
Asdew
So, you would give it 192.168.1.154/24, and it would give you 192.168.1.0?
Lieutenant
Asdew
Is it always 24?
Lieutenant
16 for the subnet mask of 255.255.0.0, up till 30, which is 255.255.255.0
Lieutenant
We'll be given "char mask" in the arguments
Lieutenant
Char means it would be character type.
Lieutenant
Is it always 24?
Shall I send the image of the problem statement for better clarity? (If allowed)
Asdew
Here's pseudocode to do the ANDing:
ip_address & ((pow(2, mask) - 1) << (32 - mask))
Asdew
Where ip_address is a uint32_t with the IP address arranged in big endian (192.168.1.154 would, in hexadecimal, be 0xc0 0xa8 0x01 0x9a).
Lieutenant
Lieutenant
Asdew
Lieutenant
Asad
does stackoverflow occur if I call a function that calls another function and continues so on... ? it is not a recursion btw, just calling a function inside another one
Sasuke
Suggest a beginner project apart from game
Sasuke
Asad
ahh i forgot
Asad
i am doing GUI thing. There are multiple functions that contain Main Event Loops of different pages... For example, if the user presses CONTINUE, the program proceeds and another Main Event Loop function of different page will be called. The process continues until the user presses SAVE or something similar... Doesn't this lead to stackoverflow or it is better to change the architecture of the program?
Dima
Dima
simplified distributed systems*
Sasuke
Asdew
A game server
Jussi
Sasuke
Lieutenant
I think I have to go with this
Start with imitating the network as a graph. Then add networking properties like IP, MAC, subnet. Then implement a CLI to this. And keep going.
Lieutenant
May I suggest a Udemy course for this project?