Hi, I am relatively new to c++ and DW so this may sound a little stiff. I recently learned about classes and I was wondering if there is a way to take user input and set that input to a private variable. I know it would require accessors methods, but is this possible? And if so, how would one go about doing that? Any help would be appreciated.

Recommended Answers

All 2 Replies

The most common way is to overload the operator>>

Of course right after I read your response I figured it out. Thanks for the quick response btw.

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.