ULTIMATE QUESTION.
1
Name:
Anonymous
2007-09-16 16:33
ID:megCKdPE
(1) char* string_ptr;
(2) char *string_ptr;
(3) What the fuck does ptr mean?
2
Name:
Anonymous
2007-09-16 16:35
ID:megCKdPE
1. Clarity 4 realz
3
Name:
Anonymous
2007-09-16 16:46
ID:6CzfdJRe
it's shorthand for "puter" which is an abbreviation of "computer"
4
Name:
Anonymous
2007-09-16 16:49
ID:dbKC/rhY
i thought puter was wetback speak for faggot
5
Name:
Anonymous
2007-09-16 16:53
ID:ORF0UaRc
char_ptr string;
6
Name:
Anonymous
2007-09-16 17:00
ID:dbKC/rhY
pointer is an imaginary reference to a location in a register. ... I think ...
7
Name:
Anonymous
2007-09-16 17:11
ID:RBz7Yfe/
char* text;
RGWEAD IVRT.
8
Name:
Anonymous
2007-09-16 17:12
ID:RBz7Yfe/
O FUCK
...............
..............
9
Name:
Anonymous
2007-09-16 17:12
ID:RBz7Yfe/
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
[m] char[b] *[b] text;[/m]
10
Name:
Anonymous
2007-09-16 17:13
ID:RBz7Yfe/
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
11
Name:
Anonymous
2007-09-16 17:13
ID:RBz7Yfe/
>>10
>>10
>>10
THIS IS THE WAY
12
Name:
Anonymous
2007-09-16 17:23
ID:Heaven
>>1
none of the above because of shitty naming convention with underscores
13
Name:
Anonymous
2007-09-16 17:27
ID:RBz7Yfe/
>>12
thats perfectly good C style, but putting "ptr" in the name is certainly not.
C is not java, do not fucking use CamelToe in C.
14
Name:
Anonymous
2007-09-16 17:55
ID:2Gb6LMLn
(2) char *string_ptr;
What is the right way to create two pointers to chars?
1. char* one, two
2. char *one, *two
That settles with which part the asterisk should go.
Also I agree with
>>13
15
Name:
Anonymous
2007-09-16 17:57
ID:2Gb6LMLn
>>15
I forgot the semicolons but you get the point.
16
Name:
Anonymous
2007-09-16 18:08
ID:Ftfjbf+q
>>14
Declaring more than one variable on the same line considered harmful.
17
Name:
Anonymous
2007-09-16 18:35
ID:Heaven
>>16
You are wrong. Formal proof:
double x, y, z;
vs
double x;
double y;
double z;
18
Name:
Anonymous
2007-09-16 18:35
ID:Heaven
char*one,*two; or GTFO
19
Name:
Anonymous
2007-09-16 18:37
ID:megCKdPE
>>13
You'll find the naming convention "ptr" used a lot in K&R.
20
Name:
Anonymous
2007-09-16 18:46
ID:Heaven
21
Name:
Anonymous
2007-09-16 18:47
ID:megCKdPE
>>20
It's also used in O'Reillys "Practical C Programming". Suck my balls.
22
Name:
Anonymous
2007-09-16 18:53
ID:RBz7Yfe/
>>19
You'll find K&R is full of SHIT, as far as I'm concerned.
23
Name:
Anonymous
2007-09-16 18:54
ID:RBz7Yfe/
>>16
not knowing C and declaring things are harmful considered harmful.
24
Name:
Anonymous
2007-09-16 19:02
ID:Heaven
25
Name:
Anonymous
2007-09-16 19:31
ID:Gogw3xos
26
Name:
Anonymous
2007-09-16 19:33
ID:Heaven
27
Name:
Anonymous
2007-09-16 21:34
ID:RMUzQbry
28
Name:
Anonymous
2007-09-16 21:44
ID:Heaven
29
Name:
Anonymous
2007-09-17 5:44
ID:Heaven
1) char* ptr; might not work with all compilers.
either char * ptr; or char *ptr;
2) K&R rocks, that along with the c99 standard is all you need.
3) ptr is nice, do not use underscores and no shitty names like ``text'' or ``string''. Try buf, buffer, p, s, ptr, bufptr, etc.
>>1-23,25-27 are faggots
30
Name:
Anonymous
2007-09-17 21:53
ID:WmseDHjg
31
Name:
Anonymous
2007-09-17 22:25
ID:iENG03Ym
C sucks.
32
Name:
Anonymous
2007-09-17 22:47
ID:Us36tGrU
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
char * text;
33
Name:
gar
2007-09-17 23:40
ID:nHECll0M
34
Name:
Anonymous
2007-09-18 1:47
ID:2GH8urn8
unnecessary whitespace is for idiots who can't read
35
Name:
Anonymous
2007-09-18 2:07
ID:vts5p2YH
36
Name:
Anonymous
2007-09-18 2:15
ID:0yaFS181
unnecessary high level languages are for idiots who can't program in machine code
37
Name:
Anonymous
2007-09-18 2:33
ID:YBwFz8rK
Unnecessarily low-level languages or for idiots who can't understand real languages.
38
Name:
Anonymous
2007-09-18 2:47
ID:Jt2u2SOT
>>37
Writes Java for a living
39
Name:
Anonymous
2007-09-18 2:52
ID:RhXzbfKi
Unnecessarily panparadiagm languages for idiots who actually have a clue
40
Name:
Anonymous
2007-09-18 3:11
ID:YBwFz8rK
>>38
Oh wow. I said high-level, and you said Java. Now I'm depressed. I expected better from /prog/.
41
Name:
Anonymous
2007-09-18 3:16
ID:B51cABQl
Java is high level.
What is your definition of high-level?
42
Name:
Anonymous
2007-09-18 3:17
ID:B51cABQl
Oh I see, you didn't mean it wasn't high level.
43
Name:
Anonymous
2007-09-18 4:00
ID:YBwFz8rK
I just meant that assuming I must have been talking about Java is so fail.
44
Name:
Anonymous
2007-09-18 5:41
ID:SX91OQiQ
>>41
Java is a mid-level language at best. To be a high level language it'd need more comfortable features such as built-in lists and dictionaries (with value syntax), dynamic typing or at least type inference, etc., and/or better abstractions such as first-class functions, continuations, etc.
45
Name:
Anonymous
2007-09-18 7:38
ID:B51cABQl
>>44 whatever, it can draw stuff. It's high level.
46
Name:
Anonymous
2007-09-18 7:42
ID:B51cABQl
the 'relatively' is implied.
47
Name:
Anonymous
2007-09-18 9:10
ID:Heaven
>>45
machine code can draw stuff.
48
Name:
Anonymous
2007-09-18 9:18
ID:B51cABQl
>>47 That's obvious, what is it - captain obvious day today?
49
Name:
Anonymous
2007-09-18 9:21
ID:B51cABQl
Here is my analogy of the recent conversation:
person a: This kettle is hot!
person b: The kettle isn't hot, the SUN IS HOT!
person a: It is hot, it burnt my hand!
person c: Even cold stuff can burn your hands!
50
Name:
Anonymous
2007-09-18 9:23
ID:SX91OQiQ
person d: My other car is a cdr
53
Name:
Anonymous
2011-02-03 5:36
54
Name:
Anonymous
2013-09-01 20:02
So I've been out of the loop for several months now.
55
Name:
Anonymous
2013-09-01 20:48
If by god you mean the imaginary half naked old man that lives in the head of all American Christians then yes.