There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Okay, I don’t get it. Where is a window that shows any output from the program. I write the code, compile and execute but where is the output. When you write HTML
it comes up in a browser. Where is the output for the C++?
of course, once you are a bit further along with C++, you could build your own graphical interface with libraries like QT. Then starting your program starts a graphical window. Usually, you first work in the command line to get the basics of c++ down
HTML is just a markup language, so yes, there the HTML is rendered in the browser.
One thing that I felt was a bug is that you have to hit the Run button before compiling. I didn’t see that listed anywhere. I’m guessing that saves the file, and being used to environments that autosave is a step some people might not be used to.
So why do the square brackets become part of the output if they were not specified in the source code. I get the feeling the output is canned, and not really a result of compiling.
Currently running through the tutorials to see if it would be good for new people in the lab I work in. For some reason, code identical to the solution code(and what would work in a normal terminal) didn’t output anything at all. Maybe a bug??
I just rechecked the lesson in question, and everything seems to be working. Is it possible that you didn’t click “Run” before compiling? There is no auto-save feature. While “Run” may be a bit misleading, it saves your code. If you don’t click “Run” prior to compiling after making changes in the code editor, the compiler just re-compiles whichever code had been saved previously. If that’s not the fix, please post your code. Hope this helps!
I have noticed that on occasion the browser in the rightmost pane loses it’s connection, and has to be refreshed by refreshing my browser. Not really anything we can do other than deal with it and press on.
Here’s a link to the Codecademy Troubleshooting Guide
It has information regarding which browsers and devices will yield the best results, and a few basic tips for when gliches happen.
Happy Coding!
Out of curiosity, I tried leaving off the additional << operator after the score variable
#include
int main() {
int score = 0;
// Output
std::cout << "Player score: " << score;
}
It returns the amout of the score but has a dollar sign immediately after. Can anyone tell me what this dollar sign means? If I add the extra operator and then the ; " <<;" the program will not compile. Do I always need to follow a variable with a new line “\n”?
The dollar sign is just the prompt for the console. Your next command will be typed to the right of the dollar sign. Adding a new line "\n" to the end of any std::cout << statement will just move the prompt or the next printed value down to the next line similar to hitting ‘enter’ or ‘return’ in a word processor or text editor.
so I’m trying to pass this level of this chaining but when I input what’s is exactly asking me it keeps saying “Did you output the exact phrase using chaining? Take a look at the hint if needed.” I’m not understanding what I’m doing wrong or if its a bug in the system. I input everything as the same as the hint