klimi
Uh lambdas? Idk if I see them
Anonymous
Uh lambdas? Idk if I see them
I think I just got some "brain-illusion". I studied python for 3 months, leave it for 6 XD (Using sololearn). Anyway, what I want to know is if it is good (For any purpose) to use conditional operator or focus on if...else statement NB: I only remember that lamba function were shorter than normal function XD
Anonymous
Please do not share code with files Use paste.ubuntu.com, gist.github.com for multiple files
Anonymous
klimi
... Sorry, I didn't understand.
The final assembly it generates...
Anonymous
If you want use lambdas, use C++ :)
Not interested in learning C++ for the moment. Just wanted to know if conditional operator was a wise choice for using as a "default-mode" while not having a non-fatal logical error
Anonymous
The final assembly it generates...
I still don't understand, what should I do? XD
klimi
If you want to know what's the difference, you can look at the compiled asm
Anonymous
If you want to know what's the difference, you can look at the compiled asm
Where should I check for it? (I'm actually using DCoder, an Android App).
klimi
Idk dcoder...
Anonymous
Idk dcoder...
XD. And in Linux?
klimi
I think that GCC and clang supports it
Anonymous
I think that GCC and clang supports it
So... where should I check it?
Anonymous
So... where should I check it?
you can just go to godbolt.org
Anonymous
1) Ok, I will think about it for my next code. 2) I got some confusion, I admit it. XD
I just read what was lambda in python. It's for creating functions without a name. XD Worst, in my code I only use main function. I don't know how I considered a statement "puts" as a function XD. Well, fruit of ignorance
Indolent
What really happens when you don't write anything after the "return" keyword in a function?
Indolent
What really is the "return" keyword?
Abhi
Return keyword is used to end the program/ function execution
Abhi
Even if u didn't write return nothing happens
Anonymous
Anonymous
Even if u didn't write return nothing happens
So... you are not forced to do 'main(void)' in order to not use return?
Anonymous
What really is the "return" keyword?
Return keyword returns the control back to the caller
Anonymous
When you execute a C program you're actually jumping to a label named main and transferring control to it
Anonymous
Whatever code is at the place referenced by the label is run
Anonymous
Now that control was transferred to your program it must be returned to your OS
Anonymous
Return returns control back to the caller
Anonymous
For non void functions return needs an argument. The caller can read this value passed by return and do whatever with it
Wisenky
guys when I link libs which placed in specific location I cant execute program , it gives error that says me sfml-graphics-2.dll has not found but when I place libs and makefile with same folder it compiles and runs successfully . Where am I wrong , Im so newbie sorry at all
jc
I don't use Windows, but I thought you needed anti-slashes in those paths?
Wisenky
I think I got my problem with less files. It should be mandatory that placing dll and executables in same dir
Sasuke
guys when I link libs which placed in specific location I cant execute program , it gives error that says me sfml-graphics-2.dll has not found but when I place libs and makefile with same folder it compiles and runs successfully . Where am I wrong , Im so newbie sorry at all
In windows you have to put DLLs along the executables. In Linux you can put libs anywhere and sat the path to the folder in PATH variable I am not sure if you can do that in windows or not
Piest
How to change the adbd root directory. Means when I am using adb shell, directly it is getting access from root directory, but I want to protect it and I will give a particular directory path if the user will adb push to that directory only it should work?
Anonymous
Which is the best Linux distro for coding / development ?
I like the Arch based ones, great documentation
Đỗ
Arch so robust. I tried to tinker on Mint and Fedora for code QT_C and Ubuntu for Android. It's so good If yo want to dev Web or host your web service, RedHAt or cenOS is a good options
Đỗ
How to change the adbd root directory. Means when I am using adb shell, directly it is getting access from root directory, but I want to protect it and I will give a particular directory path if the user will adb push to that directory only it should work?
Have u try to create a symlink or alias to your root dir? Instead work directly on it, you only access it via alias, for e.g: read from it but "ls" return nothing
Piest
Have u try to create a symlink or alias to your root dir? Instead work directly on it, you only access it via alias, for e.g: read from it but "ls" return nothing
No I didn't create any symlink. I want like usb protection. Basically nobody should able to access anything. If the user wants to write any file, they should use that particular directory and even if there will be a unlock process for that user. If they will try to do adb push to any directory or root directory it should denied
Adarsh
What does return 0 means in c?
Anonymous
or null
Anonymous
Thanks
Indolent
How many purges is she going to do?
Indolent
class Node { public: int value; Node *prev; Node *next; Node(int value); }; // Why do we put Node instead of datatype in the last three?
Anonymous
Indolent
What is the meaning of Node *prev ?
Alex
pointer to previous node, like "next" is pointer to next
Indolent
I know that but why this Node before it means?
Alex
do you know what is linked list?
Indolent
Yes sir.
Alex
I can`t understand your question in this case
Indolent
I'll have to learn OOPS. It's just super boring.
shreyas
Hello guys, I just wanted to know where I can learn C online. All suggestions are welcome, thanks! @Rtr_238
𝙉𝙞𝙫𝙞👑
Mm
𝙉𝙞𝙫𝙞👑
I unmuted
Pavel
Hello! Why can I get stack overflow in malloc() and how to avoid that?
Pavel
I call malloc many times in recursion (Depth-First Traversal)
Anonymous
Hello! Why can I get stack overflow in malloc() and how to avoid that?
U can't get stack overflow using malloc. malloc is used to allocate space on heap.
Mar!o
Bruh
Pavel
void DFS(struct DFS_arguments *arguments) { ... for ([next_x, next_y] : moves) { if (!arguments->used[next_x][next_y]) { arguments->used[next_x][next_y] = 1; struct DFS_arguments *new_arguments = malloc(sizeof(struct DFS_arguments))); new_arguments->x = new_x; new_arguments->y = new_y; DFS(new_arguments); free(new_arguments); } ... } Some pseudo-code to understand, what am I doing
Pavel
Recursion depth is around 30000, size of DFS_arguments is less than 128 bytes
Artöm
Stack size is about 1MiB by default
Pavel
Stack size is about 1MiB by default
Yeah, I was wrong in my calculations, it was a regular stack overflow, thank you
Ajay
error: no matching function for call to 'std::multiset<int>::erase(std::multiset<int>::reverse_iterator&)' I'm getting this
Ajay
but http://www.enseignement.polytechnique.fr/informatique/INF478/docs/Cpp/en/cpp/container/multiset/erase.html