Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Professor Science
Mar 8, 2006
diplodocus + mortarboard = party
GUI Libraies
Windows API
GTK
Qt
wxWidgets

Adbot
ADBOT LOVES YOU

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party
It's very easy to hang yourself in C, but it will all be because of accidents and the all of the problems you cause will have the same fundamental cause (a bad pointer).

It's very easy to hang yourself in C++, except it will be because you used some language feature (actually, it'll be more like "you used some huge set of language features") that you didn't fully understand and now you've dug an inescapable hole. I really never got into the whole template thing or anything like that--I see the point, but I've never really seen a huge benefit in what I've worked on. So, I code in C++, but I use it as C with a few things that make it a lot more convenient (some OO, operator overloading, references, the STL, etc.).

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

fret logic posted:

Is the Ansi C Programming Language a good book to learn C from if you're familiar with the basics of programming, or are there better books to start with?
is this Kernighan and Ritchie? K&R is *the* book

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

fret logic posted:

Yes, but is the one I'm talking about the right one? I know the K&R "style" is supposed to come from the first edition, and that the second one is the ansi style. Should I be using the first or second edition?
absolutely use the second edition

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

fret logic posted:

Heh, because I can't stop myself from wanting to mess with one or the other. So far it hasn't really been a big deal, but if it gets to the point where I can't separate the two, I'll stick with one.
Stick with C at first, because you will get confused between pointers and references and arrays and STL containers and new and malloc and all the things they do differently. Once you can look at C++ and see how it's built on top of C clearly, it will make a lot more sense.

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party
What the gently caress, Qt 4.4 supports futures? Holy poo poo.

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

JoeNotCharles posted:

Wow, the whole QConcurrent framework looks fantastic.
Any idea how it's implemented on the backend?

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party
if (c == ' ') wouldn't work?

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

Mikey-San posted:

I know you're learning C++, and not straight C, but have you considered getting a copy of K&R? (It covers this kind of stuff very well.) It might be a huge help to you.

Edit: Then again, trying to learn C++ while reading K&R might not be a great idea. Is there some equivalent the C++ goons recommend?
honestly, K&R is always a good idea. I think learning C is a prerequisite to being a competent C++ programmer, plus K&R is so clear and concise that it's not really a bear to get through. as far as C++ books go, I'm fond of the Stroustrup book, but that's mainly because I can hit people with it. that IS a bear to get through, as it's closer to a reference book or language specification than a tutorial, but if you can make it through, you will know C++ pretty drat well.

(plus you can beat the poo poo out of people with it)

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

Plastic Jesus posted:

Learning to program by reading K&R is like learning French by reading Rimbaud. It can be done, but you're going to be confused, frustrated and it'll take you 3 times longer than necessary.
what? K&R has some pretty straightforward examples in the beginning, but I will admit that by the end they can be almost too concise. but then again it's the kind of book you can read many times and still get something out of it when you're a beginning/intermediate programmer.

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

Mustach posted:

Unless you're on Plan 9, this is how every compiler does things by default. The C and C++ runtimes (msvcrt.dll on Windows and libc.so, etc. on Linux) are dynamically linked to your program unless you tell the compiler otherwise.
:woop: Plan 9 :woop:

Adbot
ADBOT LOVES YOU

Professor Science
Mar 8, 2006
diplodocus + mortarboard = party

shrughes posted:

Could you give a concrete example? fmod(12.0, 3.0) == 0.0 for me. I would expect examples modulo some integer to work fine.
depends on how big the integers are and what floating point precision you're using...

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply