Replies: 4 comments 9 replies
-
Umm can you create a pr with all your changes. I am sorry I made all of these. At first I thought that it outputs |
Beta Was this translation helpful? Give feedback.
-
Also I meant advanced cause beginners don't really need to learn all these when they first learn about operators. |
Beta Was this translation helpful? Give feedback.
-
Sure, I'll make the adjustments in a PR in roughly 14-16 hours. As for Keywords are, for lack of a better word, permeant, that is, they cannot be imported from a file, that fundamentally makes no sense. Keywords are valid anywhere in the language (unless syntatically prohibited), whereas variables are scoped identifiers. namespace std {
std::ostream cout = ...;
std::istream cin = ...;
} No "magic" whatsoever, they're implemented in plain C++. |
Beta Was this translation helpful? Give feedback.
-
I saw your comment in Operators.md:
Operations don't care about where the value is being stored, it has no clue where it is being stored. All that matters are the operands, and the operation, nothing more. What you probably wanted would be this: double three = 3.0;
double four = 4.0;
double addition = three + four;
double subtraction = four - three;
double multiplication = three * four;
double division = four / three; all that matters is Technicially, no truncuation was ever performed, since the decimals were never even calculated to begin with. There is one con to using doubles/floats for this section though: you'd have to omit the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There's a good amount of the C++ tutorial that could be improved as to not alientate readers right off the bat.
For example, Advanced-Operators.md shows
std::cout
logging0
and1
for booleans.In my fork, I added
std::boolalpha
so the code would showtrue
orfalse
, which are much more "human-friendly," especially helpful if you're learning the language (which is the audience that tutorials tend to target).Also, the entire file seems like a misnomer, as the operatiors aren't that "advanced," especially considering how there is a whole plethora of C++ operators that hadn't been covered yet.
Besides that, there's plenty of small errors, such as calling
cout
andcin
keywords in Setup.md, instead of globals, or multi-level comments instead of multi-line comments.Beta Was this translation helpful? Give feedback.
All reactions