[FIXED] C++ lesson specifics and compiling issues

Every other step has been cleared, but when compiling I suddenly get a slew of errors saying every time I wrote tempf or tempc there were two or more data (the error trails off the screen) in declaration of ‘tempc’ or ‘tempf’. But the code was entered correctly every other step, so what is the issue now?

This is dogshit. Why am I not able to use endl, using namespace std, etc. Really aggravating me that you can’t use unique solutions. Whoever made it so there can’t be more than one way to solve it is ■■■■■■■■. I’m sorry for my anger, but over time it gets really irritating.

I’m sorry you dislike the syntax preferences of Codecademy, but what they do is they stick with one form of syntax, and that syntax can be annoying for most of us, even though it’s actually valid.

The code you make outside of Codecademy is fine, no matter what way you use the syntax.

#include <iostream>
using namespace std;

int main() {
    
    cout << "Hello World!" << endl;
    
    return 0;

}

But in Codecademy, you’re forced to use their syntax, and not what you choose.

#include <iostream>

int main() {

    std::cout << "Hello World!\n";

    return 0;

}

If you choose to learn from Codecademy, then you’ll probably have to use their syntax to proceed. It may seem terrible to you, but it’s fine.

Because when you complete their courses, you can choose whatever valid form of syntax you choose.

2 Likes

Step 4 needs to be a little more explicit in its instruction. How should we compile,

$ g++ temperature.cpp
$ ./a.out

or,

$ g++ temperature.cpp -o temperature
$ ./temperature

It would appear the first one is the way to go. Has anyone succeeded using the other?

4 Likes

hey @leonhardeuler9754768 this is sonny, the curriculum developer for this course. i definitely want to allow different solutions. this is something im definitely going to tackle.

it’s going to take me a few days to add two additional tests for each one of the checkpoints. will do it asap.

5 Likes

hey @kapow512, can you copy and paste your code in here so i can take a look? thank u~

2 Likes

@mtf hey roy, looking into it!

3 Likes

u are right! im adding the test for the second one right now and also adding a hint.

UPDATE: fixed.

4 Likes