/prog/ - Programming

Anything related to programming and creating software.

[Post a Reply]

File: glenda-trollface.png(20729)
How do you type out your pointers Anonymous 2021-04-26T06:17:20Z No. https://fchan.xyz/prog/1606BEVL [Report]

int* ip or int *p

Anonymous 2021-04-26T17:00:54Z No. https://fchan.xyz/prog/0TSJF9I4 [Report]

int* ip I dont declare multiple pointers on one line so int* ip, *dp doesnt happen

Anonymous 2021-04-26T20:57:30Z No. https://fchan.xyz/prog/ADZUP3XB [Report]

>>https://fchan.xyz/prog/1606BEVL 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 2021-04-26T21:48:58Z No. https://fchan.xyz/prog/SG6H9U6I [Report]

>>https://fchan.xyz/prog/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

Anonymous 2021-04-27T06:40:28Z No. https://fchan.xyz/prog/0I7KWJIV [Report]

>>https://fchan.xyz/prog/1606BEVL But how do you access struct members? struct garbage garbage1; garbage1.item1 ----or---- garbage1->item1

Anonymous 2021-04-27T10:10:51Z No. https://fchan.xyz/prog/CPPQE7Q6 [Report]

>>https://fchan.xyz/prog/0I7KWJIV if garbage1 is a pointer, i use garbage1->item1 else /* it is a regular variable */ i use garbage1.item1

Anonymous 2021-04-28T22:20:15Z No. https://fchan.xyz/prog/F3HDTVRH [Report]

>>https://fchan.xyz/prog/0I7KWJIV If garbage1 is a pointer >> garbage1.item1 is wrong bro. You can only use >> garbage1->item1

Anonymous 2021-05-09T15:41:06Z No. https://fchan.xyz/prog/B0W2SD51 [Report]

>>https://fchan.xyz/prog/SG6H9U6I then do >int * p, * q; it's still easier to see it as "int pointer" with this exception

Anonymous 2021-05-09T18:46:46Z No. https://fchan.xyz/prog/OCTLEQR0 [Report]

>>https://fchan.xyz/prog/B0W2SD51 >2 spaces now that is just silly

8 / 0
[Post a Reply]


All media are copyright to their respective owners.