learning c/c++
Re: learning c/c++
I can get that.
EDIT:
Thank you.
EDIT:
Thank you.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: learning c/c++
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++
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++
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 )
Now for my rant:
So Steve Jobs dies--media/fanboys go bonkers.
4 days later...Dennis Richie dies......
.....
.....
.....
.....
Now for my rant:
So Steve Jobs dies--media/fanboys go bonkers.
4 days later...Dennis Richie dies......
.....
.....
.....
.....
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: learning c/c++
That's *obviously* a typo, fixed now. Should've been "Plus, what is a vtable?".Opcode wrote:That's not even a sentence.Griwes wrote:Plus, what I vtable?
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: learning c/c++
Who is/was Dennis Richie?Opcode wrote:Now for my rant:
So Steve Jobs dies--media/fanboys go bonkers.
4 days later...Dennis Richie dies......
.....
.....
.....
.....
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: learning c/c++
Oh, I see
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: learning c/c++
m12 wrote:Who is/was Dennis Richie?
That was terrible.m12 wrote:Oh, I see
Re: learning c/c++
I was being serious, no joking. I had never heard of him.Brynet-Inc wrote:m12 wrote:Who is/was Dennis Richie?That was terrible.m12 wrote:Oh, I see
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: learning c/c++
I would start with the second book here, the C Programming Language, 2nd ed. Feel free to look over the rest of the list.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: learning c/c++
Haha, I agree. Only for OS Dev though. No programming language is really useless, it just depends what you use it for.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.
Back in my Game Dev days, C++ was king.
Currently developing Lithium OS (LiOS).
Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: learning c/c++
On what grounds do you make this claim?BMW wrote:No programming language is really useless, it just depends what you use it for.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: learning c/c++
On the grounds that he has clearly never worked with Befunge or Malbolge.Love4Boobies wrote:On what grounds do you make this claim?BMW wrote:No programming language is really useless, it just depends what you use it for.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: learning c/c++
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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: learning c/c++
There are a couple simple ones, but they took years to figure out from what I know. A hello world, for example: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.
Code: Select all
('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>