/prog/ - Programming

[X]

(for post deletion)
(12.00 MiB max)
Mark sensitive


File: glenda-trollface.png (20.24 KiB) [Draw]
How do you type out your pointers Anonymous 04/26/21(Mon)06:17:20 No. fprog-1606BEVL
int* ip or int *p
>>
Anonymous 04/26/21(Mon)17:00:54 No. fprog-0TSJF9I4
int* ip I dont declare multiple pointers on one line so int* ip, *dp doesnt happen
>>
Anonymous 04/26/21(Mon)20:57:30 No. fprog-ADZUP3XB >>fprog-SG6H9U6I
>>fprog-1606BEVL (OP) int * p but if you want to be a faggot about it int* p is better than int *p. the type is an "int pointer" so it should go together
>>
Anonymous 04/26/21(Mon)21:48:58 No. fprog-SG6H9U6I >>fprog-B0W2SD51
>>fprog-ADZUP3XB but if you declare multiple pointers it gets confusing int* p, q; only p is a pointer, but >the type is an "int pointer" makes you think both are so use int *p, q; for clarity's sake the '*' modifies the variable, not the type
>>
>>fprog-1606BEVL (OP) But how do you access struct members? struct garbage garbage1; garbage1.item1 ----or---- garbage1->item1
>>
Anonymous 04/27/21(Tue)10:10:51 No. fprog-CPPQE7Q6
>>fprog-0I7KWJIV if garbage1 is a pointer, i use garbage1->item1 else /* it is a regular variable */ i use garbage1.item1
>>
Anonymous 04/28/21(Wed)22:20:15 No. fprog-F3HDTVRH
>>fprog-0I7KWJIV If garbage1 is a pointer >> garbage1.item1 is wrong bro. You can only use >> garbage1->item1
>>
Anonymous 05/09/21(Sun)15:41:06 No. fprog-B0W2SD51 >>fprog-OCTLEQR0
>>fprog-SG6H9U6I then do >int * p, * q; it's still easier to see it as "int pointer" with this exception
>>
Anonymous 05/09/21(Sun)18:46:46 No. fprog-OCTLEQR0
>>fprog-B0W2SD51 >2 spaces now that is just silly
>>
>>fprog-1606BEVL (OP) When I started C, I looked at C code to choose my coding style. Here are some of my inspirations: https://aiju.de/misc/c-style https://man.openbsd.org/style https://suckless.org/coding_style/ https://man.cat-v.org/plan_9/6/style Some code I looked at was the plan9 source code and dwm source code. Hope that helps!
>>
Anonymous 05/14/21(Fri)16:31:16 No. fprog-8U0QKH0L
>>fprog-F251CGFK my style is based on some of those as well thank Stallman for all the libreware out there that helped me learn
>>
Anonymous 05/21/21(Fri)21:05:02 No. fprog-V2BCEKA3
>>fprog-F251CGFK I like GNU style. check glib and GTK, the code style is pretty neat

[Post a Reply] 11 / 0

Delete Post: [File Only]
[Home] [Rules] [FAQ]

All trademarks and copyrights on this page are owned by their respective parties.

v0.1.1

Theme: