Page 3 of 4

Re: learning c/c++

Posted: Thu Apr 04, 2013 8:03 pm
by Mikemk
I can get that.

EDIT:
Thank you.

Re: learning c/c++

Posted: Thu Apr 04, 2013 8:16 pm
by Kazinsal
Awesome, enjoy it. It's a great book, even if the edition in C used in it is a bit archaic at times.

Re: learning c/c++

Posted: Fri Apr 05, 2013 1:14 am
by Antti
I struggled one night with printing decimal numbers because I wanted to figure it out by myself. Now that I know how to do that, it is simple and obvious. However, I did not have it right away. Albeit my implementation differs from this, the K&R book gives the answer. I should have read it more carefully.

Code: Select all

/* C Programming Language, 4.10 Recursion, page 73 */

#include <stdio.h>

/* printd: print n in decimal */
void printd(int n)
{
	if (n < 0) {
		putchar('-');
		n = -n;
	}
	if (n / 10)
		printd(n / 10);
	putchar(n % 10 + '0');
}

Re: learning c/c++

Posted: Fri Apr 05, 2013 8:43 am
by Opcode
Thanks for the link--I was a little hesitant about posting one. This book is considered by most to be the bible of the C world--as such a hard copy should be obtained if your wallet and locale permit it. Worst case is you have a nice showpiece for your bookshelf. (I would be your friend if I walked into your home and saw this on your bookshelf :D )

Now for my rant:

So Steve Jobs dies--media/fanboys go bonkers.

4 days later...Dennis Richie dies......
.....
.....
.....
.....

Re: learning c/c++

Posted: Fri Apr 05, 2013 9:00 am
by Griwes
Opcode wrote:
Griwes wrote:Plus, what I vtable?
That's not even a sentence.
That's *obviously* a typo, fixed now. Should've been "Plus, what is a vtable?".

Re: learning c/c++

Posted: Fri Apr 05, 2013 9:40 am
by Mikemk
Opcode wrote:Now for my rant:

So Steve Jobs dies--media/fanboys go bonkers.

4 days later...Dennis Richie dies......
.....
.....
.....
.....
Who is/was Dennis Richie?

Re: learning c/c++

Posted: Fri Apr 05, 2013 9:41 am
by Mikemk
Oh, I see

Re: learning c/c++

Posted: Fri Apr 05, 2013 9:57 am
by Brynet-Inc
m12 wrote:Who is/was Dennis Richie?
m12 wrote:Oh, I see
That was terrible.

Re: learning c/c++

Posted: Fri Apr 05, 2013 10:26 am
by Mikemk
Brynet-Inc wrote:
m12 wrote:Who is/was Dennis Richie?
m12 wrote:Oh, I see
That was terrible.
I was being serious, no joking. I had never heard of him.

Re: learning c/c++

Posted: Sun May 19, 2013 5:36 am
by Love4Boobies
I would start with the second book here, the C Programming Language, 2nd ed. Feel free to look over the rest of the list.

Re: learning c/c++

Posted: Wed Jun 12, 2013 3:46 am
by BMW
Brendan wrote:
I'm NOT saying that C++ is bad (it is, but I'm not saying it ;) ). What I am saying is that C is a lot closer to assembly and a lot easier for an assembly language programmer to get used to.
Haha, I agree. Only for OS Dev though. No programming language is really useless, it just depends what you use it for.

Back in my Game Dev days, C++ was king.

Re: learning c/c++

Posted: Wed Jun 12, 2013 4:10 am
by Love4Boobies
BMW wrote:No programming language is really useless, it just depends what you use it for.
On what grounds do you make this claim?

Re: learning c/c++

Posted: Wed Jun 12, 2013 10:30 am
by Kazinsal
Love4Boobies wrote:
BMW wrote:No programming language is really useless, it just depends what you use it for.
On what grounds do you make this claim?
On the grounds that he has clearly never worked with Befunge or Malbolge.

Re: learning c/c++

Posted: Wed Jun 12, 2013 11:17 am
by Love4Boobies
I don't think anyone has ever been able to write a Malbolge program---not even as much as a "hello, world!" For a long time it wasn't even known which type of language it is; it was thought to be a LBA but was eventually proven to be Turing-complete.

Re: learning c/c++

Posted: Wed Jun 12, 2013 11:26 am
by Kazinsal
Love4Boobies wrote:I don't think anyone has ever been able to write a Malbolge program---not even as much as a "hello, world!" For a long time it wasn't even known which type of language it is; it was thought to be a LBA but was eventually proven to be Turing-complete.
There are a couple simple ones, but they took years to figure out from what I know. A hello world, for example:

Code: Select all

('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
Makes unmaintained, poorly-crafted x86 assembly language look like C64 BASIC.