Talk:Intro To C++/First Program

= Problems =

I read parts of this, and I find the book to be awkwardly assumptious? You don't mention a compiler, or even an editor. You just go straight to writting in C++. I noticed you linked this book to another book, in-order for a reader to get a foundation of some sort. Introduction to programming is a incomplete book, based on simple python constructs and I think it doesn't provide valuable information to a C++ based book.

"This bit up here, it tells the computer to look for a file called iostream. Then the using namespace std; bit, tells the computer to look for a section called std and use the code that is in there. The use of these files is referred to as including (the file(s))."

This doesn't explain everything. iostream is a file, with pre-defined functions, used to help the programmer do menial tasks. What you're including is a header file. using std, is just a simple macro telling the compiler that you'll be using functions from the class std.

"int main tells the computer to create a new section of the code called main. Each C++ program has to have one and only one of these. int stands for integer, which in computers, is a fairly large number, and main, well, its main"

Main is a function that C++ needs in-order to begin execution. int before the main, implies that it has to return an integer. Also, int's can be extremely small, and it directly correlates to the number of bits the computer has.

"and main, well, its main"

I just don't understand the point of this.

"Computer - More than half of the time that you see computer (the computer looks for int main, etc, etc.) in this tutorial, it actually means compiler."

Just say compiler. This evidently could become confusing to a reader, acknowledging that a computer doesn't care what a function is defined as.

"Then it turns all of that good stuff into assembly, in which the computer can actually understand."

Computers don't understand assembly. The reason the code is converted to assembly, is because assembly is the bridge between high level languages and machine code.

I think this book needs to be looked at. Suggesting a new programmer uses a system function, is inherently dangerous. What's wrong with cin.get? Nothing is wrong with it, and it's safer to use. I have many problems with this text, and I hope no future programmer comes across this until it's been edited, and edited some more.

GhostMD (discuss • contribs) 03:24, 12 March 2012 (UTC)

Needs serious rewriting.
This page has some serious issues, both technical and in writing style:
 * Assumes Windows/MSVC
 * Uses various Windows-specific extensions, such as conio.h or getch, used solely to work around Windows-only issues.
 * Talks about the "build"-button (of MSVC, probably) and how Windows automatically closes the console (no other OS does this)
 * Uses system calls.
 * Uses the non-standard "pause" function (which, again, is only required on Windows as other OSes's consoles aren't broken)
 * Does not include header, required for std::system.
 * Uses using namespace std -- pretty much recommended against by every experienced C++ programmer due to namespace pollution
 * If you don't understand why using namespace std is a bad thing ("durr it makes my type less") you are not capable of writing a C++ book. Go study some more.
 * Writing resembles something more reminiscent of the average YouTube comment by a 12-year old than an actual handbook on a technical topic.
 * Use of multiple punctuation marks after a sentence
 * Capitalization, spacing after.
 * Spelling mistakes, don't get me started.
 * "Liek n0w I gunna show u h0w 2 c0de."

I submitted a review with some of the more blatant technical details removed, you might want to look some more into it, though. SeySayux (discuss • contribs) 13:51, 8 March 2013 (UTC)