For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | jjesus's commentsregister

I didn't see Bruce Eckel's Thinking in C++; the PDF is free: http://mindview.net/Books/TICPP/ThinkingInCPP2e.html

I thought Eckel's book was especially good for someone who already had a background in C.


Anything that hasn't been updated to take into account C++11 is going to do more of a disservice than be of help.


A turboprop is also much better as a platform for surveillance radar. No engines hanging below the wing obscuring the radar field. Turboprop flies slower and thus stays longer over the target scene.


A turboprop is also much better as a platform for surveillance radar.


Usually declare variables one per line, so, type is still clear when:

char* var1;

char var2;


C does not in anyway forbid having two definitions on the same line hence

    char var2, *var1;
is valid C while in Java this would be illegal

    char var2, [] var1;
So the syntax is correct and all you are doing is to add style rules that make it less readable.


Having one var per line, with left bound typing seems more readable to me.

That said, I understand the differences in traditions.

I think that C's syntax is flexible that we can each go to our own, and decide which is more readable.


I tend to see typedef on a pointer type to address this.

    typedef char * pchar;

    pchar var1, var2; // Now they're both pointers
I'm not really a fan, but it can address the problem.


The language is that of Redmont, which I shall not utter here.


And then leave the poor beginner wondering why it's

char var1[10];

and not

char[10] var1;

The rule is simple once you understand it, variables are declared with the same syntax that is used to access it later.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You