2
Feb 16 '22
Guys please stop commenting. I know that I missed a semicolon. I don’t need 23 comments telling me what the first guy told me. This problem has been solved
3
2
u/douglasbolden Feb 15 '22
May want to fix your indentation a little as well. It is VERY important during big projects.
-2
u/SaylorMan1496 Feb 15 '22
When first learning in c++ this isn’t super important IMO but it definitely helps readability
Any beginners reading this it is really important for languages like python but most languages don’t care about white space (technically could be crammed into one line but this obviously tanks readability)
2
u/douglasbolden Feb 15 '22
I am not sure what you are talking about. There are many problems with leaving whitespace in C++
2
u/IHaveThePowerOfGod Feb 15 '22
i’m new : is leaving a space between things like << not good?
2
1
u/douglasbolden Feb 15 '22
What I was mainly getting at, is if you leave whit space in a call of any sort, it is going to cause some serious issues.
2
2
2
2
1
u/sedawker Feb 16 '22
Besides the missing semi-comma, the worst crime is the amount of pointless comments. Honestly I bet you missed the semi-comma because of the comments.
1
Feb 16 '22
Get a proper IDE as well. This looks like notepad++? Pure text editors lacking any intellisense will making coding in C++ or any language a pain
1
Feb 16 '22
In most cases it is preferred to not use 'namespace std'. Instead, on standard library function calls such as cout and cin, use 'std::cout' and 'std::cin'
This makes compile times faster and is more explicit in declarations to avoid confusion of which functions are coming from what libraries.
1
u/turingparade Feb 16 '22
Seeing a semicolon error get missed like this brought back a lot of nostalgia
Keep up the programming my guy, and look forward to (or more like lament) the next time you forget one of those bastards
1
1
0
-1
48
0
Feb 15 '22
[deleted]
8
u/John_cCmndhd Feb 15 '22
To a beginner, it's not obvious that a missing "initializer" would mean you're missing something at the end of a line. And that stupid laughing emoji. If you don't want to help, don't help, but don't be a jerk for no reason
29
u/This_Growth2898 Feb 15 '22
Good rule: always check the line before. You've forgotten a semicolon, so the statement wasn't finished.