1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
makkiz [27]
3 years ago
7

I keep getting this error: postfix.cpp: In function ‘double RPN_evaluation(std::string)’: postfix.cpp:42:26: error: cannot conve

rt ‘__gnu_cxx::__alloc_traits > >::value_type {aka std::basic_string }’ to ‘char’ for argument ‘1’ to ‘int isOperand(char)’ if(isOperand(expr.at(g))){ ^ postfix.cpp:96:1: warning: control reaches end of non-void function [-Wreturn-type] } I am not sure what I am doing wrong, help please
Computers and Technology
1 answer:
Svetradugi [14.3K]3 years ago
3 0

Answer:

expr.at(g) returns a string, not a char. They are not the same thing and that is what the compiler is complaining about.

You might be interested in
People who work the total hours for which they get paid have
Troyanec [42]
Perfect attendance and a salary
7 0
3 years ago
Read 2 more answers
NEED HELP ASAP!!!
Triss [41]

Answer:

Feet & Inches

4). Millimeters

5). Pixels

3 0
2 years ago
How many comparisons will be done to find 8 in this list using a linear search?
Margaret [11]

Answer:

I think 4 comparisons

8 0
3 years ago
Why is color important for all objects drawn ?​
Sati [7]
Technically, drawing in colored pencil is simply layering semitransparent colors on paper to create vivid paintings. Every color has three qualities
7 0
3 years ago
Write a program that computes and displays a 15 percent tip when the
Anuta_ua [19.1K]
Your question wasn't very clear, but I think I understand what you want. Additionally, you should really state what language you're working with. Here it is in C#, and shouldn't be too much of a hassle to translate in to other languages.


Console.Write("Enter payment: ");

float payment;

if (float.TryParse(Console.ReadLine(), out payment))
    Console.WriteLine((Math.Floor(payment * 100) / 100) * 0.15, + " at 15% tip.");
else
    Console.WriteLine("Invalid input.");
5 0
3 years ago
Other questions:
  • Jorge has $300 for work he performed. He expects to spend the money in the next few weeks to buy a new bike. Which type of accou
    8·1 answer
  • How was windows 3 installed on a pc?
    11·1 answer
  • What is looping in QBASIC​
    9·1 answer
  • "You are setting up a new subnetwork on an existing network. Management has asked that you use existing cabling that the company
    14·1 answer
  • Which device assists with medical imaging? HELPPPP!!!!!!
    12·1 answer
  • Which of the following specific components are incorporated on HDInsight clusters?
    13·1 answer
  • When a climbing distance of __________, landing platforms must be in place every __________ feet. Platforms will be offset from
    12·1 answer
  • Write a function SwapArrayEnds() that swaps the first and last elements of the function's array parameter.
    6·1 answer
  • Bob The Penguin is a real you-tuber, and he plays Mine-craft. Who is his owner?
    6·1 answer
  • Give the value of the zero flag, the carry flag, the signflag, and the overflow flag after each of the following instructions if
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!