0

I'm trying to write an echo like thing doing this
:

> echo Muffins
Muffinst
> echo two muffins
two muffins

The problem Is that the program isn't being started from command line,
The > is my programs input prompt (trying to write a very simple command line)
How would I do this?
Would it be possible with formatted input (cin>>)?
or would I have to use scanf?

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by WaltP
0

How wOuld I separate echo from the rest of the string (seperatre not remove I still need to see what the person is doing)?

0

Write a couple test programs to understand how input works.

1) use cin in a loop to read and display what is read
2) use getline() in a loop to read and display what is read
3) same with other input commands you know

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.