Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Hazarth I guess it does do pointer increment. I guess you need precedence parens to actually increment the pointed to value.
-
What, that's a standard C idiom, nothing wrong with that. Of course, you need to know the operator precedence. And while you're at it, also integer promotion.
@AvatarOfKaine No.
*src++ returns the content of *src, then increments the src pointer. It's equivalent to *(src++).
(*src)++ returns the content of *src, increments this content, and leaves the src pointer as is. -
@AvatarOfKaine C is fine.
But you gotta know yourr precedence table.
https://en.cppreference.com/w/c/... -
@thebiochemic @aviophile I find C to be very beautiful and cursed at the same time.
When you know what it's capable of, it's a very powerful weapon. But also it can destroy both legs if you shoot it the wrong way. -
@AvatarOfKaine
[1] make
gcc -c something_up.c
gcc -c that_is_new.c
gcc -o something_up something_up.o that_is_new.o
[2] make install -
@iSwimInTheC it is a programming language created 50 years ago, survived and still largely used, for a good reason: it is small, elegant and fast as fuck. I love it
-
@iSwimInTheC say something actually new. Gave up because the gcc statements were amusing this time
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
elgringo41Student - Teacher renaming .c to .exe make the program executable ? Teacher - Yes A group of people stand up...
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
tt = *src++;
The C programmers that use dereferencing and postfix de-/increment in the same statement, can go and fuck themselves
rant
c
c++