![]() Main (and only main) is allowed to implicitly return 0. Technically you don't need the return statement, but it's not a bad thing to keep it. You don't need the cmath header, you don't use anything from it. For example, std::cout << "What is your first number:\n" Zerodha - Indias biggest stock broker offering the lowest, cheapest brokerage rates for futures and options, commodity trading, equity and mutual funds. How to use: Help R: Read expression E: Evaluate and print latest expression E n: Evaluate and print nth expression P: Print latest expression postfix P n: Print nth expression postfix I: Print latest expression infix I n: Print nth expression infix T: Print latest. Similarly, so will your line with "CALCULATOR" and the question after it.Ĭout << string << char can be simplified to cout << string_with_char. ![]() Missing newlines after printing your result/error, your asterisks will be on the same line. :13:10: error: no match for 'operator'} and 'double') Read your error messages, it's not pretty, but: Validate your input, what happens if I don't put in a number.ĭon't Repeat Yourself, you've got four cases that all end in the same line, that line could instead be one after the switch statement. "I'm stuck" doesn't tell anyone what might be wrong, or why you think it's wrong. First of all, it helps to both format your code with reddit markdown (four spaces before each line, or in the WYSIWYG editor there's a "code" button") and secondly state what the issue you're having is. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |