ok i understand that now. So i if i wanted to save the file, i would have to make a function called Save() for example, which would open the file and also open an ostream and then go through each of...
Type: Posts; User: Asagohan
ok i understand that now. So i if i wanted to save the file, i would have to make a function called Save() for example, which would open the file and also open an ostream and then go through each of...
so just say i had one big database file. How could i use the read/write functions in my object classes to read/write from the correct part of the file?
so for the example that i gave before. Just say i had a function called get() which gets the details for a book.
i would have :
void Book::get(void)
{
ostream bookstream;
cout<<"what is...
is there anywhere i can find an example of how to use it? Or could you write a quick one? Do i need to override the >> or << operators?
I often see classes such as the following with istream, outstream etc. I was just wondering what they are used for and how i could use them. It has something to do with serialization right?
I...
is there a built in date class in c++? Or something similar? I want to be able to store dates in a variable and compare them etc.
ok cool its working. Thanx alot.
ok so what i'm going to do is have an interface which will ask what item they want to insert and they will say Apple for example. And then i say Apple *Apple1=new Apple;
Then, if i pass this to my...
Yes i have list<item> which stores all the items. Could you give me a short example in code which demonstrates what you said because i dont exactly understand what you mean.
Hi, i have a base class called Item which contains subclasses, Book, Serial and Newspaper. I have a virtual function called dispInfo which will display the information for that particular type of...
I want to search between two array indicies as fast as possible for the largest element. I have an algorithm but i want to make it faster. I am thinking to use a heap but im not sure how i would...
The reason why the pairs are in a huge 2d array is becuase there will be so many, so if i keep searching linearly through the 1d array I will take ages if i have 100,000 pairs to go through.
...
It's not quite homework, more like a project I've been working on... The main point is to make it run as fast as possible, due to the huge data set I'll have to work with. The number of ints will be...
I have a problem. I have a large number of intergers in a file. After that, i have an even larger number of paris. The number of pairs are almost the square of the number of integers. And the pairs...