~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
think about it
You get out of bounds exception.
I put in my keyboard.
Immortality is a curse.
My spirit -> hollow
Damn ! Several billion pages filled because funny google PROGRAMMERS.
Bleh..then I can see only one solution -- try to keep the value of max_enteries as low as possible. Try out with different values of max and see which of those doesnt flag the error.
Considering the kind of restrictions imposed on you, I am pretty sure than the size of 500 is not required or is not mentioned in the problem statement. Just keep the record of 50 books and it should work out to be fine.
But if your professor is still adamant on 500 then....may god be your saviour. I'll pray for you.... ;)
_()_
Bad programming practice is bad programming practice, be it a simple "hello world" program or a complete software.
Maybe time and experience will teach you that, but lets hope its not the hard way for you....;)
I think that Dev C++ follows the standard better, since it really uses a very common open source compiler. A program should close unless you make it wait within the code. Anything else is added by the IDE and is not standard.
Your version of Borland C++ is very old. Also Borland has a long history of straying from the standards. I am really surprised they are still around.
Agreed...better get a modern compiler which discourage you by disallowing you from using non standard functions.
"system("PAUSE");" can make the console window stay until you press any key.
This is bad programming practice and for the reasons why, you can see a really good article by my friend and moderator Mr. WaltP.
To make the output window stay you can make the program wait for the user to press a key, so that you get to see the output of your program.
If using C++ you can place cin.get( ) at the end of your program, before return 0.
If using C, you can place getchar( ) at the end of your program, before return 0.
That shouldn't matter one bit. The header files are pulled into the source before compilation and therefore splitting them up doesn't influence the footprint of the compilation unit.
agree -- you only put the extern declarations in header files, not the actual instances of the objects. The actual instances of the data must not exceed 64K in any one *.c file.
Bleh...it was just a desperate idea...no need to beat me up that badly..:D
Vishesh, what you can do is that, you can use files instead of variables i.e. using files for reading as well as writing data. Though it would be really inefficient to do much of a reading and writing, you can provide the solution without using pointers or by declaring excessive variables.
And btw, I think this was the actual intent of the problem statement, to make you people to use files.
But having experienced and seen the contents of these Dietel books, personally I feel that they are bad. All the spoon feeding would get you nowhere.
Better follow Mr. Bench's advice and go with books which have higher rating and good reviews, which I think the Dietel books don't have. Good books like Accelerated C++ would be tough to start with, but are really worth their price considering the depth which they cover.
BTW, in case you don't know, there is a really good book, [search]Thinking in C++[/search] which is for free download (yes free as in beer). You can try out that book, get a hang of C++ and then decide for yourself which book really suits you.
almighty -> godly
22.1 my best after 20 tries...;)
Bleh...
doesn't surprise me.
You get Pepsi.
I put in some soda.
DAMN! Some billion pages filled because funny google adsense!
Game is what life plays with us mere mortals.
The thing here being that we can't see the setup or the configuration you have made with your IDE, so helping you out would be really difficult.
One thing you can try to do is create a new project from scratch, copy the contents of your program you want to the new file and then try out the same thing. It this doesn't work, then you have really messed up something somewhere, which I won't be able to tell from here.
Try out what I have said and then let me know the results.
You get to couple with a vampiress
I put in some hotdogs
fact that a
wrong -> alright
wow, some billion pages MARRED because horrible google adsense!
More and more people have started to like this thread.
Perspection can be distorted, believe in what you want and you should be alright.
std::string has a function size() that will tell the current size.
void addNodes(string names[]) { cout << "size of array is " << names.size() << "\n"; }
Hmm...you are forgetting that names is an array of strings and not a std::string or a vector. So you can't apply the size( ) function to it, it is applicable to C++ containers, not array of containers. The only way to do this thing correctly is to do it like specified by Miss Narue in the second post.
WOW, some billion pages flooded by horrible google adsense!
have with you.
You get to be the author of Harry Putter
I put in some ink.
my website -> non existent
Entertaining is what most of the people think this thread is, but not many know the reality.
It has taken me a good couple of weeks to learn the blender interface.
I'm not sure if I want to switch.
If you want to ride the professional wave (ie plan on making a living otu of animation), I am afraid the switch has to take place. Not many places you see Blender be used for professional work. But if it is for fun, carry on.
Maybe you should show your funky 2D artwork to Miss Dani, she would be really happy :D
More to the point. I can't seem to get the crack to work.
Err...if I were you, I would stop saying such things in open, it will just ruin your reputation, not to mention a hefty infraction ;) (again this is coming from a friend, not a moderator).
You get all terrorized.
I put in some pudding.
It really depends on what is your original intent of learning the language. If you are a 33 year old who wants to earn a living, I would very much recommend you to learn C# or the other hot technologies rather than dabbling with pointers in C. On the other hand, if you are a 15 year old who really wants to get his concept cleared and is very intent on going for research work, I would recommend him to learn a assertive language like C or Python and a functional lanauge like LISP, Haskell, etc.
IMHO, it solely depends on the purpose one is trying to achieve.
Just a side note....I understand the argument that C should be taught first and am not by any means saying it's wrong. It's totally opinion at this point.
Yes, exactly the point I was trying to prove.
After you learn a JAVA or even C#, I'd backtrack (I say backtrack because of the language decendancy from C for both languages) to C so that you can get a full appreciation of the language.
Yet to see a person who started off his programming with a very high level language like C# or Java and who is really adept at understanding the inner mechanics of high level languages like C or C++.
I WANT the language to provide methods/functions so that I can get the jist of whats going on before I decide to play jesus.
So you mean that someone who wants to start off with Assembly programming should first dabble a bit with C# and after getting the *jist* of it, should try to play Jesus with Assembly. Good joke. ;)
Many others support my view point.
I really so badly want to start C and/or C++. Anyone aware of ways in which I can go about beginning, and which should I start out with bearing in mind I am doing this on my own, Any suggestions?
And thanks, I'm looking forward to really having fun while learning here!
My personal opinion, go with C++. Many people out there will ask you to go for lanaguages like C# and Java which makes your life easy, but personally I think that if you can survive a nuke, bullets will look like sissy to you. Same way, if you manage to tame the raw power of C or C++, other languages are easily manageable. Programming in C will give you the feeling of a creator since they don't have a host of functions to do everyday tasks which you would have to code on your own.
I started off with C and so whichever modern language I look at makes me feel happy seeing the kind of abstraction they offer along with the host of inbuilt functions which make your life a lot easier. If you in this *only* for money, I would recommend you to go with C# or Java since there is a lot of market for these langauges.
As an ending note, a very interesting article on which language you should go for, a must read.
get a feel
Hotwheels -> cool cars
Yes Maya and Max are what the professionals aspire to work with. Also the professional industry demands Max and Maya.
Though from what I have heard, Maya is basically used for making animation movies while Max for making game models.
Atta boy Iamthwee, there is lot to be done and rendered...:D
Yes, some MILLION blogs flooded by horrible google intellitxt
Them is not a good word to start a sentence with...
Not quite correct a statement about a company that generates billions for charity...
They donate huge amounts of computer equipment and software each year to schools in poor communities for example, and Bill Gates has put a major part of his fortune into the Gates Foundation which he runs with his wife and father that donates hundreds of millions each year to healthcare and education projects all over the world.
Paul Allen also donates a lot to charity.In fact they're likely to be just about the company that donates the most to charity of any (and just about the highest percentage of revenue of any major company).
Looks like someone missed my smilie ;)
You get to become an Alchemist.
I put in some paper.
the moment and
Okay from what I gather, you want your program to look like a real software with all the graphical user interface and all that ?
Well the thing is that creating user interfaces is not the thing C++ is best at. Creating GUI applications require a *lot* of code and expertise in the specific domain not to mention interfacing with a third party library.
If I were you, I would slow down a bit and learn all the C++ concepts using normal console applications and then move on to the higher concepts like Graphical Applications and all that.
Say what you want to.
Yes, the several forum flooded by horrible google INTELLITXT.
Programmer's Life -> Full of fun
So is there any method to solve this. Also whats the limit of the global data. I am supposed to use Borland C++
The limit is I think 64K of memory.
One solution you can try is to create seperate header files with each header file containing variables having less than 64K of size. For eg.
Contents of header file 1
#define MAX_CAPACITY 500
int bookId[MAX_CAPACITY];
char bookName[MAX_CAPACITY][50];
char bookAuthor[MAX_CAPACITY][50];
int boolIssue[MAX_CAPACITY]; // 0, 1
Contents of header file 2
char dateIssue[MAX_CAPACITY][12]; // dd-mm-yyyy
char dateReturn[MAX_CAPACITY][12]; // dd-mm-yyyy
int issuedTo[MAX_CAPACITY];
int issueToClass[MAX_CAPACITY];
char issueToSection[MAX_CAPACITY];
int boolMember[MAX_CAPACITY]; // -1, 0, 1
And in your program use :
#include <header1.h>
#include <header2.h>
int main( )
{
// code
}
Yes, the Daniweb forum FLOODED by many google adsense.
the fissures and..