Multiple inputs on one line

Yes, you can input multiple items from cin, using exactly the syntax you describe. The result is essentially identical to: This is due to a technique called “operator chaining”. Each call to operator>>(istream&, T) (where T is some arbitrary type) returns a reference to its first argument. So cin >> a returns cin, which can … Read more

How can I get a file’s size in C++?

See http://www.cplusplus.com/doc/tutorial/files/ for more information on files in C++. edit: this answer is not correct since tellg() does not necessarily return the right value. See http://stackoverflow.com/a/22986486/1835769

Plotting graphs in C++

You could try https://github.com/lava/matplotlib-cpp, which looks like it is just a wrapper around matplotlib anyway, so you are still calling/using Python and matplotlib in the end. With this you probably can copy your code nearly verbatim to “C++”.

Using cin to input a single letter into a char

You are not inputting or outputting the characters correctly. char letter[2] is an array of 2 characters, not a single character. You want char letter. Further, you are outputting letter[2], which is the third element of an array that only has two values (indexing in C++ starts from 0; the first element is letter[0] and … Read more

Static vs dynamic type checking in C++

Static type checking means that type checking occurs at compile time. No type information is used at runtime in that case. Dynamic type checking occurs when type information is used at runtime. C++ uses a mechanism called RTTI (runtime type information) to implement this. The most common example where RTTI is used is the dynamic_cast … Read more

Use of ‘const’ for function parameters

The reason is that const for the parameter only applies locally within the function, since it is working on a copy of the data. This means the function signature is really the same anyways. It’s probably bad style to do this a lot though. I personally tend to not use const except for reference and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)