Stop bitching about your Linux DEs and let's do something productive. Like some C discussion

Do you think this is a safe function for initializing a struct? I want to discuss what practices you'd use instead.
int mllCreate(memetic_linkedlist* list)
{
list = malloc(sizeof* list);
if(list = null) return 1;
return 0;
}

1. Code tags;
2. This won't work and it's obvious why; and
3. It's not the name of a plant, but based off of Japanese "to lower."

>Code Tags
How do they work?
>This won't work and it's obvious why
Explain, if it's really that obvious.
>It's not the name of a plant, but based off of Japanese "to lower."
Wtf

Fuck you, this is not a computer science board. It's more like /cm/ but with only Stallman pics

>list = malloc ...
>list = null
sure love me some memory leaks

>Sup Forums - Technology

>let's be productive by stupid beginner questions
lol you're such a try hard OP

kek fucking SQL confuses me. It should be list == nul

OP is probably a retard who thinks that making C programs as if he was doing Java means being an engineer

>How do they work?
lurk more but preferably in the direction of the sticky
>Explain, if it's really that obvious.
Consider the following:
/* ... */

memetic_linkedlist *asdf == NULL;
mllCreate(asdf);
if (asdf == NULL) {
printf("what is scope\n");
}

/* ... */
>Wtf
See point 1.

OP is probably a retard who thinks that making C programs as if he was doing Java means being an engineer. And people like him gets employed instead of actual engineers with degrees sometimes, and that's why most software is fucking flawed.

Source?

>confusing = and ==
Kill yourselves.

I'm going to blame muphry's law and posting from my phone in bed right now.
g-gomen, user-kun-senpai...

the CEOs are usually morons who dont know anything about tech or handling a business, its best to start your own always

It is supposed that you check mllCreate's value to see whether the pointer is usable or not. And doing side effect ignoring scope is actually Linux system style.

The wtf is about the japanese stuff. What the hell did you mean.

He's probably a virgin who thinks japanese women will love him instead of trashing him just like american ones (which is what actually happens).

>Means to lower
>But sage isn't a downvote
Checkmate, atheists.

>It is supposed that you check mllCreate's value to see whether the pointer is usable or not.
I'm going to spell it out for you: "asdf" is never touched by your function; a copy of it is. When that function ends, the copy is destroyed, leaving the memory allocated but unreachable.
>The wtf is about the japanese stuff.
Lurk more.
anime website

I went to a job interview to a big corporate last year, and they didn't even ask if I had a fucking CS degree. They just asked me what programming languages I "knew", as if it's a binary thing, you know it or not.

>"asdf" is never touched by your function; a copy of it is. When that function ends, the copy is destroyed, leaving the memory allocated but unreachable.
That's not true. You're passing a pointer to the variable, don't you see that fancy * symbol?

The variable is the pointer. The pointer you pass is never touched:
/* ... */

memetic_linkedlist *asdf = NULL;
mllCreate(asdf); /* asdf is NULL before, NULL after */

/* ... */
The only way to change the value of asdf is to either return the pointer you allocated and assign it to asdf or pass &asdf instead, changing the function accordingly.

you need to pass a pointer to the pointer, you sluggish faggot.

where's the sticky post with code tags anyway? I'm at my uni and chrome fucking bugs making finding it impossible

>anime website
more like virgin neckbeard website. Also, why do they even want those yellow sluts? They have shitty faces, cranky teeth and the body of an 11 yrs old boy. And they won't get laid by them anyways. Rejected for rejected, I'd rather be by a decent grill.

test

lol, imagine how many dumb programming inexperienced people got inside by lying about their skills, actually you dont have to imagine, just look at the web in general

"I can code in C, C++, Java, Python and Ruby"
Funny how I could say that same thing before getting into uni and after my PhD.
And you wonder why even popular software is often buggy af.