i'm writing a News class and their subclasses but i have a problem with that function.it tells me that function(virtual string ToFileFormat() ) must convert the news to a string that holds the file format of that news.(File format of each news are given after the class definition)And this function is a virtual function and in every sub-classes i must implement them and in abstracted class of course.is there any const. implementetion for these functions.Basicly i didnt understand its sense.i haven't got any time to finish that program but i cant going on.can anyone tell me about that function.Basicly, what it is doing and how it seems like.thank you...

That's not a standard function, and I haven't ever seen it before. What library is it from?

That's not a standard function, and I haven't ever seen it before. What library is it from?

i'll add just string,iostream,fstream librarys.

Is ToFileFormat() a function you wrote? If so, I can't tell you anything about it without seeing your code. As it is, I can only guess about what it's supposed to do, much less how it does it and why your derived classes don't like it. ;)

Is ToFileFormat() a function you wrote? If so, I can't tell you anything about it without seeing your code. As it is, I can only guess about what it's supposed to do, much less how it does it and why your derived classes don't like it. ;)

ok i just wanna know about what it does.i didnt start to write this function cos i've no idea about it.

ok i just wanna know about what it does.i didnt start to write this function cos i've no idea about it.

Sorry, but as much as I wish it were so, I can't pull software requirements from thin air and actually come up with something productive. :lol: You need to tell me what the function is supposed to do before I can offer any advice at all, because right now all I have to go on is the name, and the name isn't obvious. :(

i'm writing a News class and their subclasses but i have a problem with that function.it tells me that function(virtual string ToFileFormat() ) must convert the news to a string that holds the file format of that news.(File format of each news are given after the class definition)And this function is a virtual function and in every sub-classes i must implement them and in abstracted class of course.is there any const. implementetion for these functions.Basicly i didnt understand its sense.i haven't got any time to finish that program but i cant going on.can anyone tell me about that function.Basicly, what it is doing and how it seems like.

I'll say it clearly for you to understand: post your entire program's code. And use code tags.

Don't worry about the rest; we'll handle that. :)

This article has been dead for over six months. Start a new discussion instead.