Pls...could any one tell me that whether we can access the
public data memeber of a class from another class with in
the same program.
Awaiting for your response Thanku
Answer Posted / pramod
If it's about the data accessing, whether public or private
... you can use friend function.This friend function can be
member of 2nd class and friend for the 1st class.
| Is This Answer Correct ? | 6 Yes | 0 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.
What are the features of oop?
How can you overcome the diamond problem in inheritance?
What is a class in oop?
Why multiple inheritance is not allowed?
Why it is called runtime polymorphism?
How long to learn object oriented programming?
What is class in oop with example?
What is class and object with example?
Why is object oriented programming so hard?
officer say me - i am offered to a smoking , then what can you say
Why is polymorphism important in oop?
can we make game by using c
What is multilevel inheritance?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?