Solved

just remove compliation errors in dev c++ 4.9.9.2

Posted on 2010-11-21
18
646 Views
Last Modified: 2012-05-10
just remove compliation errors in dev c++ 4.9.9.2
and suggest how can i use the inheritance in it.

Make a menu-driven project to create a library information system containing the following information for the proper storage and processing of books in the library.
(a) Accession Number                  (b) Name of the Author
(c) Title of the Book                  (d) Publisher Name
(e) Publisher Name                  (f) Cost of the Book
(g) Year of Publication            (h) Number of pages

Use the of inheritance

Menus:
1) Add a new Book
2) Display all the books
3) Delete a Book Details (Soft Delete only)
4) Search a book using Accession Number
bookstore.cpp
0
Comment
Question by:Dinesh Kumar
  • 5
  • 5
  • 4
  • +1
18 Comments
 
LVL 53

Expert Comment

by:Infinity08
Comment Utility
First : it's easier for us if you post the code as a code snippet, rather than attaching it to your post.

Second : could you list what compiler errors you are getting ?
0
 
LVL 8

Accepted Solution

by:
Subrat (C++ windows/Linux) earned 125 total points
Comment Utility
Which compiler you are using???

Try to modify as follows
1. Constructor can't return ant value or constr can't have a return type.
So delete void before constructor.
group::group()

2. Need to inclue "iostream" bcz ur using cout.
   Also use
   using namespace std;

Hope now it'll compile.
Plz send us the error tht ur getting....
0
 

Author Comment

by:Dinesh Kumar
Comment Utility
The Compiler/tool is attached now. Please install it and run the code which i have given in the question.

the errors are attached.

Please remove them at all let me know. I think they should take note more than one hour.
devcpp-4.9.9.2-setup.exe
errors.jpg
0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 125 total points
Comment Utility
>> Please install it and run the code which i have given in the question.

Please run the code on your system, and paste the compiler output here.


>> Please remove them at all let me know. I think they should take note more than one hour.

And I guess your time is more valuable than ours :)


The errors in your screenshot are very straightforward. They indicate very clearly what is going wrong, so I suggest you go over each of the error messages (starting with the first), and fix them one by one.

The first warning tells you that you are using an antiquated header (fstream.h it seems). The modern version of that header is <fstream> (without the .h), so you should be using that.

The next error tells you that main should return int, not void. So make sure it does.

Etc.
0
 

Author Comment

by:Dinesh Kumar
Comment Utility
i used fstream it generated more errors!
0
 

Author Comment

by:Dinesh Kumar
Comment Utility
and gotoxy and clrscr are coming undeclared why?
I have used conio.h file above.
0
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
I'm not sure,but think that is not available(conio.h).
0
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
>>i used fstream it generated more errors!

Have a selected C++ while created the project. If Yes, then there might be some problem in your compiler IDE...
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:Dinesh Kumar
Comment Utility
please check it as i have given you the set up also of dev c++. its very urgent and I need to work on many more issues. I'll be very thankful to you for your time.
0
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
R u finding clrscr(), gotoxy() etc... in conio.h?
0
 
LVL 8

Expert Comment

by:Subrat (C++ windows/Linux)
Comment Utility
hope you need to use TC++ compiler.
0
 
LVL 9

Assisted Solution

by:masheik
masheik earned 250 total points
Comment Utility
Use system("cls")
by including windows.h header instead clrscr()
0
 
LVL 9

Assisted Solution

by:masheik
masheik earned 250 total points
Comment Utility
To use clrscr,gotoxy
See the question 12 from following link
http://www.bloodshed.net/faq.html
http://mobile.experts-exchange.com/Q_20308388.html
0
 
LVL 53

Expert Comment

by:Infinity08
Comment Utility
>> i used fstream it generated more errors!

It is quite normal that new errors appear after changing the code to use the correct header. Because the compiler has more information available to check whether the code is correct.

Apparently, it's finding problems with the way you use the fstream header functionality.

The idea of getting rid of error messages, is to fix them all one by one, starting with the first. After fixing an error, you always re-compile to get the new error list.

If you need help with specific error messages, please post them here, and we'll be happy to assist you.
0
 
LVL 53

Expert Comment

by:Infinity08
Comment Utility
>> the question was easy i.e just to remove the compilation errors and no one did it if anyone would have tried it it was not too difficult. that's why i am deleting the question.

It seems like you consider your time to be more valuable than ours, and that you don't really appreciate our (voluntary) efforts to assist you. That's not the attitude that is likely to get you many answers here.

If you are looking for an easy way to get your academic assignments done, then Experts Exchange is not the place for you. The rules of this site expressly forbid us from doing your assignment for you. Instead, we can guide you while you do the work yourself, answer specific questions, give helpful hints, point out issues, etc.

If you still want help with these error messages, then I'll still be happy to help you out with them, as long as you start with the advice that has already been given here.

You can still delete this question if you really want to, but keep in mind that, just like you, experts don't like to waste their time, and do not respond well to a complete lack of respect and appreciation.
0
 

Author Comment

by:Dinesh Kumar
Comment Utility
OK, I will carry on this question. please wait for my further queries.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now