thanks laserlight.
Type: Posts; User: gaurav9991
thanks laserlight.
thanks everyone. it helped lot.
one more question - can you recommend me a free lightweight compiler for c++ ? I have Pelles C and it's really good(for C). I have NetBeans IDE 7.0 but it asks to...
hello everyone.
i'm trying to do a diamond inheritance problem.
#include<iostream.h>
#include<string.h>
#include<conio.h>
Ok. time complexity will remain same. But what about speed of execution? For nonrecursive implementation we have to write push(), pop(), isstackempty(), ...
Since automatic stack is more efficient...
which tree traversal method is more efficient? recursive or nonrecursive ?
Most of the people says that nonrecursiv is more efficient.
But i have a book of data structure by Langsam, Augenstein and...
i hav read "fclose()
must be called after file
operations to avoid unexpected errors."
but what is need of fclose()?
What are "unexpeted errors" possible if file is not closed?
What will...
thanks. I got it.
is it possible that the minimum cost of spanning of a weighted graph is different by Kruskal's algorithm and by Prim's algorithm?
malloc returns a void pointer. You need to typecast it.
newPtr =(StackNode *) malloc(sizeof
(StackNode));
i think this should work.
on which line?
here i'm done. it works fine in turbo c++. got two more days to finalize it. expecting some suggestions to make it better.
and thanks to all for helping me to complete it. really thanks.
...
no no no.. it should be like that only. here's the demo
i have these values in index file
1,3,5,7,9
i want to delete 5
then i use fseek(fp_index, sizeof(int), SEEK_CUR); to set file...
thanks for your help adak. I have spent a lot time on this code and i'm agree with what you have stated here. But i have to follow what my instructors have told me. Of course i am allowed to do...
thanks adak. i have changed add() function to accept random numbers like 2,4,9.. and the code you posted for edit() wasn't working with the new add() so i changed it. delete() is working for only...
this code is working absolutely fine for me on pellesC. I have removed '_' sign from _filelength, _fileno, and _chsize. If the the problem in TurboC is with this functions only, then edit() function...
yes, they told me to do what i have posted in the first post. And you are right that what i'm doing isn't an efficient way to do that task. But I have to do what they have stated. It's something like...
ok. here i'm done. thank you very much anduril462.
_chsize() worked great for me on pellesC 64bit.
But the ........ is that i have to make it compatible with turbo c++ because we have this...
oops.. i'm sorry. I forgot to post new code. here it is
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
typedef struct student {
int roll;
thanks to everyone for guide.
All the functions are working fine without warning on PellesC(64 bit) except delet(). when I wants to delete a record from file, i shifts all records after that one...
thank you and i also found search() working properly.
Now i'm trying edit() and using ftell() after every use of fseek(), fread() and fwrite(). But at line commented with PROBLEM, ftell(fp_record)...
after lots of efforts i have done add() and search() but search() not working still. delete() not modified for this project yet. any kind of suggestion is welcome.
#include<stdio.h>...
hello everyone
i have an assignment to complete as soon as possible. It's something like:
1.create (or open existing) Index and Record files.
2.User can enter a record with roll no, name and...
declare array size as a constant and try to post the full code if possible
i don't see any question here. please be specific
when your array is of size n, it has offset from 0 to n-1
you are printinting array[n] which has garbage data.
%d is used for integers. Double is one kind of floating value.