Link to home
Start Free TrialLog in
Avatar of srikar gajawada
srikar gajawada

asked on

How to print a particular word/string from a file in c++

from the attachmet i need to print the output as

1.       class.User                                                                  

2.       class.User.mv.UserID                                             (mvè Member Variable)

3.       class.User.mv.UserPassword
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Hi,

I don't see any attachment...
You need to print, on the standard output or on a printer ?

On standard output, you'll need the "<<" operator:
std::string myData{"random text."};
std::cout << myData << std::endl;

Open in new window

To print a class, you'll probably need to overload the "<<" operator (according that make a sens of course).

Without seeing your class design or source code, I can't advice any further.
Avatar of srikar gajawada
srikar gajawada

ASKER

please find the attachment for more info
User.cpp
ASKER CERTIFIED SOLUTION
Avatar of Fabrice Lambert
Fabrice Lambert
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No answer from asker.