# Help me for Data Structures with c++

Hello guys I can’t do this can you help me please.

In computer science, an arithmetic expression can be written as either a postfix, infix or
prefix expression. You can see the examples for each of these types. Notice that the
individual numbers and operators are separated with one space.
Infix: 12 + (2 * 5) + 3 => 25 → 12 + 2 * 5 + 3 => 25
Postfix: {[12 (2 5 ) +] 3 +} => 25 → 12 2 5 * + 3 + => 25
Prefix: {+ [+ 12 (
2 5)] 3} => 25 → + + 12 * 2 5 3 => 25
An interesting observation is the order of operands are same for all types of expressions.
However, same observation does not fit to the order of operators. Knowing that, you can
convert each expression to another manually. You can see a step by step example which
converts an arithmetic expression from infix form to prefix form.
Step 1: 32 + 5 * 12 – 3 * 13
Step 2: 32 + (5 * 12) – (3 * 13)
Step 3: 32 + (* 5 12) - (* 3 13)
Step 4: (32 + (* 5 12)) - (* 3 13)
Step 5: (+ 32 (* 5 12)) - (* 3 13)
Step 6: - (+ 32 (* 5 12)) (* 3 13)
Step 7: - + 32 * 5 12 * 3 13
Your first job for this question is to write a function that implements a stack based algorithm
which performs a conversion from infix to prefix form on a given string as a parameter. You
may want to make a little research about the topic on the Internet. The prototype of the
function should look like:
char* infix_to_prefix(const char* infix_str);
Your second job is to evaluate the returned prefix expression from the
infix_to_prefix function and write the result to the terminal. Your program must take
the input (which are the lines of the text file) from the provided file to a queue. Each
line in the file contains an expression. Then, you can take each element from the queue and
convert to prefix form and evaluate the result.
You must follow the operator precedence rules to synchronize your stack contents of the C
programming language. Your output should look exactly like to the above sample run.
Your program should run similar for different text files that have the same format. Thus,
write your programs as generic as possible. Your program will be tested with a different 50
arithmetic expressions.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding

I understand, I tried but I couldn’t, so I wanted to share.

share what you tried and someone with knowledge of the language can give you some hints for fixing it