Please help

Cout<<“circumference=“<<2*PI*radius<<endl;

Comes out as error C2146
Please help
Please provide the whole code. In code tags.
Posting so a small snippet and your interpretation of the error code your compiler is spitting out makes it hard for us to help you. Provide compilable code, using code tags, and the EXACT error message you are getting.

How to use code tags:
http://www.cplusplus.com/articles/jEywvCM9/

Using my murky crystal ball.....

C++ is "case sensitive, it's cout (or std::cout), not Cout.

If/when you get your code to compile I see another potential problem based on your single code snippet. Integer math truncation.
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2146?view=vs-2019

Also, be careful of simply copy/pasting code which might have been mucked up by exuberant formatters.

Cout<<“circumference=“<<2*PI*radius<<endl;

Whacky HTML “ is not the same as regular 7-bit ASCII ".
cout << "circumference = " << 2*PI*radius << endl;

Copy that, quote marks are right this time so it should work.
EDIT: Just as @salem c wrote as I just realized.
Last edited on
You may get this if you use Cout:
[Error] 'Cout' is not declared in this scope.
Becareful, 'Cout' is not as same as 'cout' (std::cout).
Use std::cout but not 'Cout'.
Topic archived. No new replies allowed.