/dpt/ - Daily Programming Thread

Previous thread: What are you working on, Sup Forums?

Other urls found in this thread:

doc.rust-lang.org/1.2.0/book/dining-philosophers.html
twitter.com/SFWRedditVideos

rust can't do this

for(auto &item : std::as_const(vec))

haskell!

Delete this reddit shit.

Report this thread. Do not post in this thread.

Frogs aren't against the rules.

>>>/global/rules/6

>he claims to be a programmer
>he doesn't even overeat

>doesn't mention frogs
Frogs aren't against the rules.

done, theres always a kid who thinks going against the Sup Forums traditions is edgy and funnay xdd

but i do

i just ate 20 chicken nuggets

But user, traditions are of no value in the general case.

This is the most cancerous millennial redditor attitude you could possibly have.
Fuck off.

>This is the most cancerous millennial redditor attitude you could possibly have.
No, it's simply the truth.
>Fuck off.
No, fuck you.

this

we should stick to using C and C++

rust is communist trash

doc.rust-lang.org/1.2.0/book/dining-philosophers.html
>fn main() {
let p1 = Philosopher::new("Judith Butler");
let p2 = Philosopher::new("Gilles Deleuze");
let p3 = Philosopher::new("Karl Marx");
let p4 = Philosopher::new("Emma Goldman");
let p5 = Philosopher::new("Michel Foucault");
}

That's completely unrelated.
Also, traditions are of no inherent value ever.
Also, C++ is shit but C is the only good language and Rust is even worse.

You sound dead inside and a very empty person user, I feel sorry for you

You're the one who's dead inside if traditions are the only way you can pretend to be content in life.

The venn diagram of frogposts and low-quality posts is a circle.

>smuganimegirl.jpeg

A real programmer would be more bothered by the numbering starting at 1, rather than ``Communism".

>claims to be a programmer
>isn't /fit/
>couldn't write a sieve to save his life

Well you dont even have that to make you content, so that makes you the saddest in here. Congrats

That's incorrect.

Here's a low quality post without a frogpost: yrdoydoyx.

Here's a post that is a frogpost but isn't low quality: this thread.

Real thread:

>Here's a low quality post without a frogpost: yrdoydoyx.
That's actually a high quality post, merely by virtue of not being a frogpost.

>Here's a post that is a frogpost but isn't low quality: this thread.
A thread isn't a post.

Please stop spamming /dpt/ threads.

this is really sad because I like rust but these damn commies have to infect everything

>claims to be a programmer
>isn't so fat he couldn't step away from the computer if he wanted to
>programs anything other than trap dating sims

...

This thread came first, faggot.

Will somebody tell me why my shit gets dumped after the first input on this area/perimeter calculator? I cant get it to work and I'm losing my mind.

#include

int main()
{
int width;
int height;

int perimeter = width + width + height + height;
int area = width * height;

printf("The program you have started is a calculator for determining the perimeter and area of rectangles.\n");
printf("Please enter the height of your rectangle:\n");
gets("%i", height);
printf("Now please enter the width of your rectangle:\n");
gets("%i", width);

printf("The perimeter of the rectangle is %d ", perimeter);
printf("and the area of the rectangle is %d\n", area);

return(0);

}

Segment fault, Core dump

Stop bumping le reddit thread, you fucking idiots.

you need a char array instead of an int and then parse the char array as a string

This thread came first faggot

This thread was invalidated by its OP image. Stop spreading your reddit cancer here.

>"invalidated"
Fuck off kike

You should be using scanf(), not gets(). And in your scanf calls, you should put & in front of the height and width variable names. Furthermore, using %i is risky, as it will cause data corruption if the input is a number whose first digit is 0. You should use %d instead for general integer input.

>k*ke

(You)

>censorship

Bump real thread

Why don't you go there if you like talking about it so much?