Anonymous
Wow, you deserve 3 warns right away You are a dangerous person I suppose
Anonymous
/warn screen photo
Anonymous
I'm not evil today So you got away with just one warn for now
...
hes a beginner with little to no knowledge, everyone starts small
Anonymous
I_Interface
Altron Use pastebin.com.
...
Everyone MUST read and follow the rules
well, its debatable if his case violates the rules
...
as it states "Long code snippets", and his code is like what 10 or 20 lines?
Atul Anand
https://pastebin.com/sMiEAJpk
Atul Anand
in this code error is b.func not in the scope
Anonymous
well, its debatable if his case violates the rules
> posting pictures of code is not allowed What is debatable?
...
> posting pictures of code is not allowed What is debatable?
its still in the same sentence, does not explicitly state that the "long code" thing doesnt apply on that
qwert
"...posting pictures of code and... not allowed" oops same
...
Do you know how to read or what?
why are you so mean? to me just trying to help, aswell as him. ask yourself whats worse, someone asking "please hack facebook" or him actually asking a question that isnt completely made up..
Anshu
Friend function is not working In Codeblocks?
Anshu
Anyone can help me
klimi
ok
klimi
what are you talking about
SAM
Why we using pointers
olli
Why we using pointers
To reuse memory and share objects
MᏫᎻᎯᎷᎷᎬᎠ
Why we using pointers
A function can modify the objects through pointers, which is not the case when they are passed by value
︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎
Hi guys, can i ask you about something in algorithms and data structures ?
︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎
I don't get the concept of tail recursion and non-tail recursion, what is the difference between them ? Thanks guys
Francisco
I don't get the concept of tail recursion and non-tail recursion, what is the difference between them ? Thanks guys
It's not C/C++ related and it's also easy to look it up on Google. Tail recursion can be converted into a loop, non-tail recursion cannot
︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎ ︎
It's not C/C++ related and it's also easy to look it up on Google. Tail recursion can be converted into a loop, non-tail recursion cannot
That's why i asked for permission to ask you guys in algorithms and data structures, but thanks anyway
Ilya
I don't get the concept of tail recursion and non-tail recursion, what is the difference between them ? Thanks guys
tail recurtoin is not using the context of self-call except via parameters and hence the previous stack frame of this function can be collapsed and replaced with the next call's frame of the stack, so, all recursion consumes only size of one frame on the stack. if the recursion is not tail -- we must keep the prev. frame for the function to continue doing something after self-return, so, this will eat stack memory. Tail recursion is NOT optimized in C or C++, so for C and C++ this doesnot matter
Francisco
It really depends on the optimizer and the function itself, but compilers are allowed to do those kind of transformations to the code
Francisco
In fact, to see how crazy compilers can go optimizing, there's examples where clang can convert a O(n) function into a O(1) function
Francisco
Or a several lines function converted into a single instruction
Dima
Wtf
I_Interface
On pastebin.com.
Anonymous
sorry i try and format it
Anonymous
basically my program compiles
Anonymous
and get almost to the end and it gets a bus error 10
Anonymous
On pastebin.com.
https://pastebin.com/Aqtd6NwZ
Anonymous
this function is apart of a larger program i am building
Anonymous
typedef enum{DESCENDING,ASCENDING,ATOZ,ZTOA}Directionals; typedef enum{aSTRING,INTEGAR}StringorInt; typedef union{ int *intArray; char **stringArray; }ArrayCreator; typedef struct { int ArrayMemberTotal; ArrayCreator DataType; StringorInt StringorInt; Directionals Direction; int stringlength; }ArrayData;
Dima
Lol that union
Dima
wtffff
Anonymous
StringorInt is a enum, and the second one is the variable name
Anonymous
@fgallego96
Anonymous
Lol that union
use is able to choose if they dynamically make an int array or string array,
Francisco
StringorInt is a enum, and the second one is the variable name
Isn't it a compile error to name a variable just like its type? if it isn't, then it surely is a bad thing to do
Dima
just use void* lmao
Anonymous
just use void* lmao
what do you mean ?
Dima
bad practice (not for me) but you can use void*
Anonymous
Isn't it a compile error to name a variable just like its type? if it isn't, then it surely is a bad thing to do
it compiles and gather all the data required , but then when its time to allocate the memory and take it the actual members of the array from the user, it get a bus error
Anonymous
Well, it compiles with clang, but not with gcc
you probably need the full program
Anonymous
Well, it compiles with clang, but not with gcc
the full program compiles in gcc , i have the latest version also
Francisco
you probably need the full program
It doesn't matter. The snippet he showed compiles with clang but not with gcc
Francisco
Anyway, I'm pretty sure that code wouldn't pass any revision anywhere
Anonymous
what causes it
Francisco
the full program compiles in gcc , i have the latest version also
I've researched a little bit and it turns out you can't do that and it's a bug in any compiler that accepts it
Francisco
Obviously? You should never name a variable the same as the type, even though a compiler can accept it
Francisco
I don't know if that's the bug, but I'm pretty sure it's the right thing to do
Francisco
Run the code through a debugger or through valgrind. I can't tell you no more. Your code is messy and hard to understand, and I don't feel like doing it
Anonymous
lol
Francisco
That's really good!
Anonymous
Hye everyone
klimi
Hye everyone
Hyeis there
𝗝ลѴỈ3𝚪Θ
Hi guys know other groups for C#,Javascript, html5?
𝗝ลѴỈ3𝚪Θ
Excuseme my very poor english please.