When is it necessary to use member-wise initialization
list in C++?
Answer Posted / saravana
new
Is This Answer Correct ? | 5 Yes | 8 No |
Post New Answer View All Answers
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
Why is polymorphism needed?
write string class as your own class in java without using any built-in function
What is basic concept of oop?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
How to call a non virtual function in the derived class by using base class pointer
How Do you Code Composition and Aggregation in C++ ?
How do you define a class in oop?
What is oops with example?
What is inheritance in simple words?
Templates mean
Explain the concepts involved in Object Oriented programming.
Can a varargs method be overloaded?
Can destructor be overloaded?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?