How to implement flags?

Answers were Sorted based on User's Feedback



How to implement flags?..

Answer / subeetha

C++ defines some format flags for standard input and
output, which can be manipulated with the flags(), setf(),
and unsetf() functions. For example,

cout.setf(ios::left);

Is This Answer Correct ?    1 Yes 0 No

How to implement flags?..

Answer / sachin

enum Flag {Yes, No};

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C++ General Interview Questions

Write a recursive program to calculate factorial in c++.

0 Answers  


What is the difference between struct and class?

1 Answers  


What is the difference between method and message?

5 Answers   HP,


What is const in c++?

0 Answers  


How can I learn c++ easily?

0 Answers  


What is the difference between std::vector and std::list

1 Answers  


Differentiate between C and C++.

0 Answers   Wipro,


How do you find out if a linked-list has an end?

0 Answers  


What are the differences between public, private, and protected access?

12 Answers   IBM, Oracle, Wipro,


What is c++ hash?

0 Answers  


Explain how a pointer to function can be declared in C++?

0 Answers  


What are default parameters? How are they evaluated in c++ function?

0 Answers  


Categories