Hard Coded

Nov 26, 2014 at 2:56am
Hey guys, if something is "hard coded" does that mean it's not aloud to be edited or you just can't edit it?

And, I'm looking to get into c++, I heard that this is a good website for beginners with no experience, so I will start here, is there any books, I should pick up that will help me during this process?
Nov 26, 2014 at 3:18am
Hard coded is when you have something embedded into the code where it is static.

Basically when you have something like

std::string name = "FRED"; instead of
1
2
std::string name;
std::getline(std::cin, name);


A lot of people hard codes arrays. Generally you should avoid it as much as possible, because to make any adjustments you would have to re-compile and is probably more often than not more effective to just change it on the fly.


Here's a little bit more info
http://en.wikipedia.org/wiki/Hard_coding

As far as books, Duaos has a pretty good list
http://www.cplusplus.com/faq/beginners/books/


What books should I buy (or not buy)?

If you are serious about C++, you will at some point want to get a good book.

Books worth their weight in gold
Perhaps the finest list of quality C++ books you will find are over at http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

If you are looking for C books, head again to http://stackoverflow.com/questions/562303/the-definitive-c-book-guide-and-list

Bjarne Stroustrup (the creator of C++) provides direct links to the publisher for the books he has written over at http://www.stroustrup.com/

For C, K&R’s http://en.wikipedia.org/wiki/The_C_Programming_Language while a little aged, is worth twice its weight in gold.

There is also a http://www.cplusplus.com/articles/GLzyhbRD/ Article by one of our members.

Books not worth the air they displace
Unfortunately, the market is flooded with bad books — stuff that has glaring factual errors and exemplifies horrific coding standards.

A knowledgeable fellow by the name of Yechiel Kimchi maintains a very complete page called http://www.cs.technion.ac.il/users/yechiel/CS/BadBooksC+C++.html.

But, since you are just browsing, here are a list of names that should make you wary:
Schildt (http://www.seebs.net/c/c_tcn4e.html)
Deitel & Deitel
SAMS
Malik
If you feel that this list is missing names, let me know. http://www.cplusplus.com/user/Duoas/

Also avoid books that claim to be quick and easy. There is no such thing. (Learning to program computers takes effort!)
Last edited on Nov 26, 2014 at 3:21am
Nov 26, 2014 at 3:24am
Okay thanks, I guess that clears it up a bit. I am currently working on a server, and I want to change a few things, that I can't do in coding, because they say it's "Hard coded" in.

As for books, is C++ Primer 4th edition good, or any edition? I would like something that is easy to understand, I understand, most but some things just confuse me lol. I need something that goes in depth about things, and something that I can read and learn stuff, as I have no experience in coding.
Topic archived. No new replies allowed.