Search Results

Showing results 1 to 40 of 54
Search took 0.01 seconds.
Search: Posts Made By: tracethepath
Forum: C Nov 20th, 2007
Replies: 7
Views: 2,854
Posted By tracethepath
sorry WaltP Sir, will take care of it in future...



thanx a lot...this helped...!!
now the program is working fine...
Forum: C Nov 19th, 2007
Replies: 7
Views: 2,854
Posted By tracethepath
okay did that...but still its not working...


void main()
{
clrscr();
int r, ones=0, zeroes=0;
long int n;
printf("Enter A Binary Number ");
scanf("%d", &n);
Forum: C Nov 19th, 2007
Replies: 7
Views: 2,854
Posted By tracethepath
i have made the following program but i cant find what is the error...
the output is not coming correct...

for example
Enter A Binary Number 110011

Number of ones are 0
Number of zeroes are 1
Forum: C++ Nov 14th, 2007
Replies: 7
Views: 1,201
Posted By tracethepath
line 20 and 21...are you sure we can read data from a binary file like that???
Forum: C++ Nov 13th, 2007
Replies: 13
Views: 2,632
Posted By tracethepath
where are you facing the problem...???
Forum: C++ Nov 13th, 2007
Replies: 5
Views: 607
Posted By tracethepath
you want the value of i??
so just save it to another variable inside if loop!!!
Forum: C++ Nov 12th, 2007
Replies: 5
Views: 607
Posted By tracethepath
post what you have done so have or what steps you are thinking to solve the problem...
then only we will be able to help you...
Forum: C++ Nov 12th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
changed the return type of delet function from void to student*...
and returned first at the end...
now its working fine...yippie...
i am working on that memory leaks...will prompt user to delete...
Forum: C++ Nov 11th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
i modified the delet function...now its working fine except when the element to be deleted is first member...


void delet(student*first, int val)
{
student*ptr,*list,*back;
...
Forum: C++ Nov 11th, 2007
Replies: 4
Views: 541
Posted By tracethepath
can you tell the input for which the output is coming wrong?
because when i tried N as 4, A as 1 and R as 2...
output came correct...

and in second line include has wrong spellings...it must be...
Forum: C++ Nov 11th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
chhanged line 65 and 67 to gets(x->name);
and cin>>x->roll; respectively...
now display function working fine...
still working on delet function...
Forum: C++ Nov 11th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
and yes i am trying to do what you asked me to do for delet function...it will take some time..so will post my somewhat corrected code after few minutes...hoping you are online till then to help me...
Forum: C++ Nov 11th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
i cant stop using getch() and gets()...although i have known that these are non- standard and know the correct ones...since its a school assignment and we have not been taught anything else than what...
Forum: C++ Nov 11th, 2007
Replies: 3
Views: 1,413
Posted By tracethepath
put the whole thing you want to repeat in a do- while loop...
ask each time before the loop ends if the user wants to play again...
and keep a count of no. of times the loop runs...that would be...
Forum: C++ Nov 11th, 2007
Replies: 8
Views: 1,092
Posted By tracethepath
i am making a menu driven program on linked lists.
the program's display function is printing garbage values.
i.e if n=3...i add three values and when the values are displayed the last entry is...
Forum: C++ Nov 6th, 2007
Replies: 8
Views: 2,402
Posted By tracethepath
line 15, you have declare i again...that is not correct...and you have placed a semi colon after for loop there...so line 16 will run just once and will not give the desired output...

and line 29...
Forum: C++ Nov 5th, 2007
Replies: 8
Views: 11,107
Posted By tracethepath
what i think you can do is save each value of int(word[x]) in an integer array...
and then add them like 104*1000+105=sum
and then if it is ghi
103*pow(10, 6)+sum=sum...and so on...
thats just my...
Forum: C++ Nov 5th, 2007
Replies: 8
Views: 2,402
Posted By tracethepath
n again you have to call the function max between lines 10 and 11...or otherwise from where you will get the value for "n"??
Forum: C++ Nov 5th, 2007
Replies: 8
Views: 2,402
Posted By tracethepath
instead of line 9, you should use a for loop to get the values for the integer array list...

and as WaltP said you have not read an integer count...it should have been read before line 8...
...
Forum: C++ Nov 3rd, 2007
Replies: 11
Views: 1,555
Posted By tracethepath
can you post the corrected code??
i.e. the code after using matrices??
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
thanks a lot for your kind help...
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
i did that and now my loop is working fine.thanx...
but can you illustrate why while(fin) was not working correctly and while(fin.get(ch)) did?
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
oh yeah got your point. Thanx...
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
ohk going back to my code with count...
in that too while(fin) is running endlessly...can you tell me the reason why?...
thanx in advance...
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
sir as told by you i also changed that while(fin) loop to this...

while(fin)
{
ch=fin.get();
fout.put(ch);

while(ch==' ')
ch=fin.get();
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
i did this while(fin) loop is running endlessly...



and i have to use that perfectly dangerous C function because this is an assignment and we have not been taught another method to get a...
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
sorry i cant understand you...hope you dont mind explainig a bit further...
tell from my program where i am gettong wrong and what should i do to solve the problem...
Forum: C++ Nov 3rd, 2007
Replies: 22
Views: 8,773
Posted By tracethepath
i have made a program on text file to remove extra blank spaces in a file but it is not working correctly. when i run the program just "enter text" appears and after entering the text the screen just...
Forum: C++ Nov 3rd, 2007
Replies: 2
Views: 1,474
Posted By tracethepath
Forum: C++ Nov 3rd, 2007
Replies: 2
Views: 1,474
Posted By tracethepath
i have made a menu driven program for selection sort, bubble sort and insertion sort..
the first two are working correctly but despite writing the correct code (according to me, i have checked my...
Forum: C++ Oct 28th, 2007
Replies: 5
Views: 5,136
Posted By tracethepath
"sum of strings within an array"
i cannot understand this
may be the following will help you..


int arr[10], sum=0;
for(int i=0; i<n(where n is no. of elements in the array); i++)
sum+=arr[i];
Forum: C++ Oct 28th, 2007
Replies: 10
Views: 1,849
Posted By tracethepath
i don't know what the problem was...i just replaced that if statement by else and put some output statements there to keep a check and it worked fine...
Forum: C++ Oct 28th, 2007
Replies: 5
Views: 5,136
Posted By tracethepath
post what you have tried to do this first...
Forum: C++ Oct 28th, 2007
Replies: 10
Views: 1,849
Posted By tracethepath
Forum: C++ Oct 28th, 2007
Replies: 12
Views: 1,988
Posted By tracethepath
for(int i=0; i<noofstudents; i++)


i think this will help you out assuming noofstudents contains the value for the no of times you want to run the loop...or i.e no of students of type...
Forum: C++ Oct 28th, 2007
Replies: 10
Views: 1,849
Posted By tracethepath
sir, sorry i cant understand you...
i have put that in the while loop, so after modifying the data it the loop will run again and rest of the records will be written...

if i am not right......
Forum: C++ Oct 28th, 2007
Replies: 10
Views: 1,849
Posted By tracethepath
as told by you i used the following code but if the record to be modified is the last record it works fine, but if its the record somewhere in between then the rest of the records i.e. the records...
Forum: C++ Oct 28th, 2007
Replies: 11
Views: 1,175
Posted By tracethepath
ohk...
Forum: C++ Oct 28th, 2007
Replies: 10
Views: 1,548
Posted By tracethepath
sorry i have not read strings yet so didnt know...
can you tell me more about that??

thanx...
Forum: C++ Oct 28th, 2007
Replies: 7
Views: 1,152
Posted By tracethepath
so you want to enter the numbers for a particular group too for each run..??

to save the 50 numbers in the file you can simple use the following code...



int n;
ofstream...
Showing results 1 to 40 of 54

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC