Hello,
I want to know how i can build a program that reads what is in a parenthesis and print it using cout, but remember that i have to use this inserted a if method. Here is a sample of syntax:

test (test of output)

Remember that this syntax is in a file, because of this i'm putting it into a if method.

Thanks,
Nathan Paulino Campos

Why would you want to do that?

how about cout the expression manually?

Pretty much the same way as in your last post, but you have to do a condition after the while something like

if( in == '(' )
          {
              in[i++] // this is to jump the space of the parenthesis and   
                          //go to next position.
          }
           //continue reading as before and then do another condition
          if( in == ')' ) // to tell program to stop reading there.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.