Forum: C++ May 22nd, 2008 |
| Replies: 2 Views: 790 1. I wonder why things work without linking to /usr/local/sesam/lib/libssv.so if you need it.
And if links without it I wonder why you need it.
2. Compare the size/timestamp of your mate's lib and... |
Forum: C++ May 22nd, 2008 |
| Replies: 8 Views: 731 Couldn't help commenting: So a good practice is to initialize all your pointers to NULL (or 0) in c'tor (OR assign a valid address).
Also set it back to NULL once the object to which points to is... |
Forum: C++ May 22nd, 2008 |
| Replies: 8 Views: 731 He he.. :)
Stupid bug..
mitmkar has already explained it. Check out http://www.functionx.com/cppcli/variables/Lesson22.htm if still not clear.
PS: To catch such bugs in future, check the compiler... |
Forum: C++ May 20th, 2008 |
| Replies: 8 Views: 731 Couldn't figure anything from the code, given that it's not complete.
- How does Thread get Form2 obj?
- The access violation could be because one of the variables (Form2 or Memo1 or Lines) is... |
Forum: C++ May 20th, 2008 |
| Replies: 8 Views: 731 Interesting. :)
Do you have global and/or static variables anywhere ?
Also can you post:
- TForm2.h
- TForm2::TForm2() implementation |
Forum: C++ May 3rd, 2008 |
| Replies: 2 Views: 525 Assuming that your login form is a modal dialog, you can associate
- a class to that dialog (if I remember correctly, this is done when you add the dialog)
- member variables of this clas to the... |
Forum: C++ May 3rd, 2008 |
| Replies: 3 Views: 1,542 put complete code.. at least I don't understand half your problem.
also I didn't know C++ allowed type names to start with numbers. |
Forum: C++ May 3rd, 2008 |
| Replies: 2 Views: 540 If something isn't working and you donno why, please specify. If you donno how to handle some part of the assignment please specify.
We can't do the assignement for you. |
Forum: C++ May 3rd, 2008 |
| Replies: 6 Views: 738 If this was an assignment, then my guess is it's a trick thing and probably you're expected to write your own class that can represent a huge int like the one you have (exactly like what someone else... |
Forum: C++ May 3rd, 2008 |
| Replies: 2 Views: 467 Each member variable has (at least) keywords specified for it apart from name.
1. Data type - could be a basic type (int, float, char,...) or user defined type (vector, std::string, CString,... |
Forum: C++ Jul 26th, 2007 |
| Replies: 4 Views: 1,457 Are you using C++ ?!
Office-VB would be a much better choice if possible. |
Forum: C++ Jul 24th, 2007 |
| Replies: 8 Views: 16,299 This isn't related to hash, hope you know that. Ideally creation of a new thread for a new topic is helpful for everyone (rather than e.g. discussing all STL doubts in one thread).
See this link... |
Forum: C++ Jul 24th, 2007 |
| Replies: 14 Views: 3,841 Yes I did. Come on man, after having some nice time fighting with you, I have to be mad not to.. :)
The question can still remain.. |
Forum: C++ Jul 24th, 2007 |
| Replies: 3 Views: 1,153 In that case post your command line.. problem should be that you've not included String.o on command line while linking..
Do a complete rebuild (of String as well as DbRes) and post all commands you... |
Forum: C++ Jul 24th, 2007 |
| Replies: 14 Views: 3,841 Sure, doing a void main() is wrong. But at least if I don't have control over main() and still use exit(123) can I expect 123 as the return code of the executable on command line? Assume we're using... |
Forum: C++ Jul 24th, 2007 |
| Replies: 2 Views: 742 Nothing else than this (http://www.daniweb.com/forums/thread70096.html) can help you my friend.. |
Forum: C++ Jul 23rd, 2007 |
| Replies: 3 Views: 1,153 my guess is you're missing one of the std libs to be passed on command line to the linker.. one that contains definition for String class.. |
Forum: C++ Jul 23rd, 2007 |
| Replies: 4 Views: 2,699 Check the piece of code that's throwing this error.. it could be written by someone else, in which case only that guy can tell you what he meant by 100 !
Looking at the info available it's not... |
Forum: C++ Jul 21st, 2007 |
| Replies: 47 Views: 8,786 JRE is platform specific. You can't ftp /usr/bin/java from *nix to a windows machine and expect to run a java program using that.
By not writing it in assembly they don't save on that front. I... |
Forum: C++ Jul 21st, 2007 |
| Replies: 47 Views: 8,786 Yeah, I first noticed that "java" executable is written in C/C++ when I had some hotspot error and it wrote down a core file, whose pstack showed calls from main()->createVM()... So it's C at least... |
Forum: C++ Jul 20th, 2007 |
| Replies: 14 Views: 3,841 Interesting question, to rephrase:
If i have a void main() and in the code I write exit(11). When I call this program from command line what will be return code of it? |
Forum: C++ Jul 20th, 2007 |
| Replies: 5 Views: 4,108 preprocessor directives/macros are processed at the time of compilation. Arguments relevant to preprocessor (e.g. -DXXX=value) are passed to compiler and used by compiler. Any argument passed on... |
Forum: C++ Jul 6th, 2007 |
| Replies: 11 Views: 2,001 You just lived up to your name.. :) |
Forum: C++ Jul 5th, 2007 |
| Replies: 11 Views: 2,001 Next you'll say Earth is the center of Universe.. :D
C++ is superset of C.
There is a subtle difference between using C++ language to code and using C++ language's features (that are NOT... |
Forum: C++ Jul 5th, 2007 |
| Replies: 11 Views: 2,001 Depends on what your friend means.. does he mean use C++ language features to solve the problem that is solved using C..
Or does he mean just make this code compile using a C++ compiler.. ? |
Forum: C++ Jul 5th, 2007 |
| Replies: 4 Views: 7,573 Must be something to do with the way you're using them.. parameters etc.. see which object file or .so or .a file contains teh required symbols and add that on link cmd.. |
Forum: C++ Jul 4th, 2007 |
| Replies: 2 Views: 3,867 >> Can one get the system function to let the called program write its output to a
>> variable instead of writting it in the command window?
Yes. But AFAIK it would be useless because that variable... |
Forum: C++ Jul 3rd, 2007 |
| Replies: 5 Views: 1,300 Now as Vijayan has enlightened us, it's not possible to have template+virtual. So I'll answer assuming the sort function is a non-template virtual function.
You are right in saying the sort algo... |
Forum: C++ Jul 2nd, 2007 |
| Replies: 3 Views: 1,003 Post the errors you got.. (copy paste, don't use your own words to describe) |
Forum: C++ Jul 2nd, 2007 |
| Replies: 10 Views: 4,678 Seems like someone asked the question, some else read read the answers and followed up with more question and finally someone understood all and thanked. :)
If solved mark the thread as solved.. |
Forum: C++ Jun 29th, 2007 |
| Replies: 3 Views: 630 This thread (http://www.daniweb.com/forums/thread70096.html) is meant for such questions. |
Forum: C++ Jun 29th, 2007 |
| Replies: 5 Views: 1,300 >> Is a base and derived class overkill for a sorting function?
Yes (because for all practical purpose you would want your sort function to have bare minimum overhead, e.g. virtual call in this... |
Forum: C++ Jun 28th, 2007 |
| Replies: 10 Views: 4,678 Just one addition, in case of passing by pointer you would be dereferencing the pointer to pointer everytime you use it. Although compilers may optimize it. A reference works as an alias. |
Forum: C++ Jun 28th, 2007 |
| Replies: 10 Views: 1,717 Now that's perfect question to be answered with someone's signature (I really searched for it and couldn't find) which goes something like:
"Although it might be possible to collect the twigs using... |
Forum: C++ Jun 27th, 2007 |
| Replies: 10 Views: 1,717 In very gentle words NO.
Output of this code:
#include <iostream>
using namespace std;
class base
{
public:
virtual ~base() {cout << "Inside ~base()" << endl ;} |
Forum: C++ Jun 27th, 2007 |
| Replies: 10 Views: 1,717 One shouldn't do this in C++. Use C++ style casting instead (of C-style) |
Forum: C++ Jun 27th, 2007 |
| Replies: 10 Views: 1,717 A pointer pointing to base class can be converted to a pointer pointing to derived class (down-casting) if the original pointer is actually pointing to a derived class type.
To enforce this is the... |
Forum: C++ Jun 27th, 2007 |
| Replies: 10 Views: 4,678 Or of course you can pass it by C++ reference like:
void foo( char *& ptr)
{
ptr = new char[255];
}
int mian()
{
char *ptr = 0;
foo( ptr ); |
Forum: C++ Jun 26th, 2007 |
| Replies: 18 Views: 2,189 See now we know what you don't know.. :)
See this link (http://www.cplusplus.com/doc/tutorial/arrays.html) to learn teh abt arrays in C++. It tells you:
- What is an array?
- How create an array ?... |
Forum: C++ Jun 26th, 2007 |
| Replies: 10 Views: 1,683 Read-up the basics of arrays, function, function parameters.. <<= That's the direction ! |