473,508 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file handling along with link list

1 New Member
Here will designing the code for the library management software i am facing the problem while handling the data of the variables
I am not able to insert the data into the file(specifically of the character arrays)
and extracting it fom the file. Might be possible there is a peoblem in my approach
I am designing it with the help of OOP i.eclasses
untill now i have made a structure inside the class.
plz suggest me the way to implement them (i.e how to deal for addbook function)
<required header files>
class library
{
private:
struct book
{ char bname[50],bpublisher[100],bauther[50;
int bookid,bprice;
}b;
fstream bfile;
public:
void addbook();
.............
..............
...........
}
Mar 8 '07 #1
2 3678
sicarie
4,677 Recognized Expert Moderator Specialist
Here will designing the code for the library management software i am facing the problem while handling the data of the variables
I am not able to insert the data into the file(specifically of the character arrays)
and extracting it fom the file. Might be possible there is a peoblem in my approach
I am designing it with the help of OOP i.eclasses
untill now i have made a structure inside the class.
plz suggest me the way to implement them (i.e how to deal for addbook function)
<required header files>
class library
{
private:
struct book
{ char bname[50],bpublisher[100],bauther[50;
int bookid,bprice;
}b;
fstream bfile;
public:
void addbook();
.............
..............
...........
}
Just out of curiosity - why not create a separate book class as well? That would avoid the pointer implementation of a struct (using ->).
Mar 8 '07 #2
DumRat
93 New Member
Here will designing the code for the library management software i am facing the problem while handling the data of the variables
I am not able to insert the data into the file(specifically of the character arrays)
and extracting it fom the file. Might be possible there is a peoblem in my approach
I am designing it with the help of OOP i.eclasses
untill now i have made a structure inside the class.
plz suggest me the way to implement them (i.e how to deal for addbook function)
<required header files>
class library
{
private:
struct book
{ char bname[50],bpublisher[100],bauther[50;
int bookid,bprice;
}b;
fstream bfile;
public:
void addbook();
.............
..............
...........
}


Do you only have one book in the library?
As it was mentioned in the other post, how about creating a new Book class itself?
Mar 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2802
by: Neo | last post by:
Hi Frns, Could U plz. suggest me how can i reverse a link list (without recursion)??? here is my code (incomplete): #include<stdio.h>
9
2929
by: Jay Kim | last post by:
Hi, We're implementing a Windows application using Visual Basic .NET. One of the key features we need to implement is that we should be able to get the accurate byte offset of user selected...
2
1611
by: Martin | last post by:
Dear All VB.NET programmers, Does anyone of you have a good article reference to learn file handling (text, binary, etc) and XML (creating, reading, etc) in VB.NET. I heard that XML file may...
4
606
by: emanshu, Munish Nayyar | last post by:
Hi all, i am looking for different solutions for the fow:- problems please let me know if anyone have any idea. problem 1:- we have link list ( singly link list ), in which some node( say X...
9
4401
by: incredible | last post by:
how to sort link list of string
2
1634
by: Pabc | last post by:
Hi, i have a file which contains data of type int and char, i want to read the content of a file & store it into a link list.
4
2037
by: ravi | last post by:
Can any body help in finding the middle element of a link list in an effective manner i know the simple solution of using two pointers and increment one pointer by one and second by two. but...
1
8636
by: d0ugg | last post by:
Hello everyone, I need to load a multi-word strings from a file to a linked list in one of my programs, and i'm not sure how to do that. my text file looks like this- (the name of the text file...
36
2860
by: pereges | last post by:
Hi, I am wondering which of the two data structures (link list or array) would be better in my situation. I have to create a list of rays for my ray tracing program. the data structure of ray...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.