Search Results

Showing results 1 to 40 of 93
Search took 0.01 seconds.
Search: Posts Made By: bugmenot ; Forum: C++ and child forums
Forum: C++ Feb 25th, 2009
Replies: 5
Views: 369
Posted By bugmenot
Thank you very much. That really worked.

At last my program to transfer content of one file to another. Again thanks. Here is the full program for further reference to other users.
...
Forum: C++ Feb 25th, 2009
Replies: 3
Views: 799
Posted By bugmenot
I have to use a dynamic array structure to store the contents of a an input text file. Firstly I do not know how long the input text file will be and thus need to work this out first. The use of a...
Forum: C++ Feb 25th, 2009
Replies: 3
Views: 799
Posted By bugmenot
I have a very similar assignment in which we have been specified that we are NOT allowed to use vectors. Is there any other way in this case to count the number of lines of data within a text file??
Forum: C++ Feb 25th, 2009
Replies: 5
Views: 369
Posted By bugmenot
Thank you very much for taking time to correct my program. I am from India and here we learn about only basics of c++ and our syllabus is based on turbo c++ 3. So i use turbo c++ and i don't know...
Forum: C++ Feb 24th, 2009
Replies: 5
Views: 369
Posted By bugmenot
Please correct the error in my program. When i run the program on turbo c++ 3, it output 3 times. Also When i enter more than 1 entry only the last entry is outputted. Also it is outputted 3 times. ...
Forum: C++ Feb 24th, 2009
Replies: 3
Views: 783
Posted By bugmenot
I still have another problem. That is when the while loop asks continue(y/n)
When i enter n it just stuck there.

I need to make the program error free urgently. Please reply with solution. I use...
Forum: C++ Feb 24th, 2009
Replies: 3
Views: 783
Posted By bugmenot
I found the error and corrected it.
#include<fstream.h>
#include<iostream.h>
#include<conio.h>
class student
{
int rollno;
char name[20];
int tm;
public:
Forum: C++ Feb 24th, 2009
Replies: 3
Views: 783
Posted By bugmenot
think i got this from my friend

void main()
{
student obj;
obj.input();
obj.transfer();
obj.output();
getch();
}
Forum: C++ Feb 24th, 2009
Replies: 3
Views: 783
Posted By bugmenot
Please find and correct the error in my c++ program. "Linker Error: Undefined symbol _main in module c0.ASM"
The program is for transfering content of one file to another.

#include<fstream.h>...
Forum: C++ Dec 26th, 2008
Replies: 2
Views: 1,473
Posted By bugmenot
Wow. I was working all day, I missed that... I'm sorry :)
Thanks for the REALLY fast answer.

Solved.
Forum: C++ Dec 26th, 2008
Replies: 2
Views: 1,473
Posted By bugmenot
Hy, I am trying to encode an X509 certificate into base64, and since the encoder I'm using takes only char*, and typecasting doesn't work, i find a different way to do this. I'm sure there is a...
Forum: C++ Nov 11th, 2008
Replies: 2
Views: 994
Posted By bugmenot
I am using cin to input a single character from keyboard.The problem is that if 2 or more characters are entered then the rest of the characters are being considered as input for the further cin...
Forum: C++ Nov 6th, 2008
Replies: 3
Views: 829
Posted By bugmenot
If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any...
Forum: C++ Oct 13th, 2008
Replies: 7
Views: 665
Posted By bugmenot
A few more things.

* In expression, the case where a single term matches will fail because, after failing to match a '+' or '-', the code just falls through to returning false. Similar thing with...
Forum: C++ Oct 12th, 2008
Replies: 7
Views: 665
Posted By bugmenot
I can point out a few things.

* You are relying on the default return values of your boolean functions being false. In the case of 'term', if the first 'perimeter' call returns false, you might...
Forum: C++ Sep 26th, 2008
Replies: 2
Views: 527
Posted By bugmenot
In c++ i want to know how to output the result on dos screen page wise,i.e. when i am displaying something if the page is filled then a prompt should come like "Press any key to continue.."
More...
Forum: C++ Aug 6th, 2008
Replies: 10
Views: 6,201
Posted By bugmenot
This isn’t entirely true. While the debugger is great for most apps, there are times when it is not feasible, if not outright impossible to use the debugger.

It’s called Heisenberg debugging,...
Forum: C++ Jun 7th, 2008
Replies: 4
Views: 561
Posted By bugmenot
No. "continue" skips the remaining iteration of the loop (in this case, the for loop). So it goes directly to the "n++" step, and then starts the next iteration of the loop, testing the condition and...
Forum: C++ Jun 7th, 2008
Replies: 14
Views: 1,908
Posted By bugmenot
why not just call
pedal()
what is the difference?

if pedal is a virtual function in "cycle", then both will accomplish the same thing


this is identical to just
pedal()
Forum: C++ Jun 6th, 2008
Replies: 7
Views: 1,234
Posted By bugmenot
No. The vector takes care of deallocating any memory it uses when it is destructed, which also destructs all the things in the vector. The string takes care of deallocating any memory it uses when it...
Forum: C++ May 31st, 2008
Replies: 2
Views: 408
Posted By bugmenot
The standard way to do it with inheritance is probably to have an array of Employee pointers

Employee* employees[10];

(You can also dynamically allocate it if you really wish. It will be like...
Forum: C++ May 29th, 2008
Replies: 14
Views: 1,023
Posted By bugmenot
that's not what was asked
Forum: C++ May 29th, 2008
Replies: 9
Views: 2,687
Posted By bugmenot
If there is truly a legitimate reason for a subclass to want to access a field, it should be declared "protected".
Forum: C++ May 29th, 2008
Replies: 7
Views: 1,840
Posted By bugmenot
These are identical. It is a pointer in both cases. So I guess it may be more clear to write it as a pointer. The second case might cause beginners to think that you are passing an entire array by...
Forum: C++ May 24th, 2008
Replies: 5
Views: 622
Posted By bugmenot
This is wrong, by the way. "m[i]" looks up "i" as a key in the map. So it will not only fail to compile when "T" is not "int"; but even when it is an int, the binding might not exist.
Forum: C++ May 15th, 2008
Replies: 1
Views: 323
Posted By bugmenot
it's right. vector doesn't have a method named "length()". it does have a method named "size()".
Forum: C++ May 15th, 2008
Replies: 2
Views: 387
Posted By bugmenot
this one only works if the "3" part is a constant, and always creates a "rectangular" array made of contiguous parts, no pointers involved
Forum: C++ May 15th, 2008
Replies: 9
Views: 1,356
Posted By bugmenot
Next time, at least put in minimal effort and post an error or something; instead of other people repeatedly posting suggestions, and you just saying "doesn't work" each time without any clue as to...
Forum: C++ May 12th, 2008
Replies: 3
Views: 498
Posted By bugmenot
how about
root = new Node<K>(newKey, NULL, NULL);
Forum: C++ May 11th, 2008
Replies: 7
Views: 952
Posted By bugmenot
Also, a fundamental problem with your grow() function:

The last line is completely useless, because "array" is a local variable, assigning it has no effect outside the function.
Forum: C++ May 9th, 2008
Replies: 2
Views: 1,389
Posted By bugmenot
So these are all very self-explanatory. What part of the errors don't you understand?


Apparently Find() takes two arguments (a bool reference as a second argument) and doesn't return anything;...
Forum: C++ May 6th, 2008
Replies: 3
Views: 518
Posted By bugmenot
the second and fourth const are utterly and completely pointless. there is never a point to declare that a value passed by value is not going to be modified. you should remove them
Forum: C++ May 3rd, 2008
Replies: 5
Views: 22,089
Posted By bugmenot
static local variables and static data members have lifetimes like global variables (there is only one copy in the program, and it exists for the whole duration of the program), except that their...
Forum: C++ May 3rd, 2008
Replies: 4
Views: 702
Posted By bugmenot
sum should be set to 0 at the beginning of every iteration of the outer loop

and i is only incremented at every block of three, so "bin[i]" is the same all three times
Forum: C++ May 2nd, 2008
Replies: 7
Views: 597
Posted By bugmenot
wow.

what did you expect that code to do?
Forum: C++ May 2nd, 2008
Replies: 4
Views: 572
Posted By bugmenot
except that it doesn't check bounds
Forum: C++ May 2nd, 2008
Replies: 3
Views: 420
Posted By bugmenot
should probably be
opOverload obj1(10,20);
opOverload obj2(30,40);
Forum: C++ May 1st, 2008
Replies: 5
Views: 707
Posted By bugmenot
just download it from the sourceforge project
http://sourceforge.net/projects/dev-cpp/
Forum: C++ Apr 29th, 2008
Replies: 2
Views: 415
Posted By bugmenot
you need to make the method in the base class virtual
http://en.wikipedia.org/wiki/Virtual_function
Forum: C++ Apr 29th, 2008
Replies: 4
Views: 2,281
Posted By bugmenot
if you need to delete arbitrary elements a lot, then perhaps you don't want to use a vector, because it is very expensive, both to find it and to shift all the remaining elements
Showing results 1 to 40 of 93

 


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

©2003 - 2009 DaniWeb® LLC