|
Hi...
Does anyone know why FaxRegisterRoutingExtension fails on Windows XP,
while it succeeds on Windows 2000?
Thanks very much
|
|
|
|
|
See here[^] if its good for you
|
|
|
|
|
Hello everyone,
I need to record a set of data items. For each data item, users may modify to some new content. So, I plan to use a timestamp field for each data item to record the time when user modifies data item last time.
I am not sure whether I should use a simple integer value (like version information, which increase 1 each time when user modifies data item)?
Which approach is better? What are the advantages and disadvantages of each approach?
thanks in advance,
George
|
|
|
|
|
George_George wrote: I am not sure whether I should use a simple integer value (like version information, which increase 1 each time when user modifies data item)?
This would only tell you how many times, rather than when, the item was modified.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you DavidCrow,
Do you mean using timestamp is always better than using integer?
regards,
George
|
|
|
|
|
George_George wrote: Do you mean using timestamp is always better than using integer?
Only if your goal is to "record the time when user modifies data item last time."
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi DavidCrow,
I only want to check which one is new and which one is old. I do not have to use timestamp, right? Anyway, are there any advantages when using a simple integer other than using timestamp?
regards,
George
|
|
|
|
|
George_George wrote: I only want to check which one is new and which one is old.
Then a simple numeric value would work.
George_George wrote: I do not have to use timestamp, right?
Correct.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you all the time, DavidCrow!
regards,
George
|
|
|
|
|
I have a string class, where I defined the binary operator '+' in the following ways:
class String:public List<char> {
...
String& operator + (const char[]) const;
String& operator + (const int) const;
friend String& operator +(const char[], const String& );
friend String& operator +(const uint, const String& );
...
}
along with an inherited method from the base class List<type> as follows:
List<TYPE>& operator + (const List<TYPE>& ) const;
When I try to build the project, I get the following error:
error C2678: binary '+' : no operator found which takes a left-hand operand of type 'String' (or there is no acceptable conversion)
I am getting three identical errors from other parts of my program that were written in a similar manner. Does anyone know what this can be attributed to? Thanks,
-Jeff
-- modified at 8:03 Wednesday 16th August, 2006
|
|
|
|
|
The message is issued by the compiler that didn't find a match that
satisfy the RIGHT operand, you said nothing about.
Admitting it was another "String", the reasons is because, when you
override a name all definition pertinent to that
name are lost in the inner scope.
In fact, since you override operator+ in String ,
any underlying operator+ in List
are anymore visible while accessing String .
You should redeclare, in String ,
friend String& operator+(const String& s)
{ return List<char>::operator+(s); }
along with the other operator+ variants you
already declared.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
I attempted that piece of code, and received an error like "Using non-static member of List<char>"
However, your response inspired me to try other things that were close to your solution, and the one that finally made the problem go away was simply to redefine the operation in the string class like:
String& String::operator +(const String&) const { <code here> }
I guess what I am confused about, is the following: In the following code, why isn't the List operator + equivalent to the String operator + as defined above from the compiler's perspective? Is there a way to make them equivalent, perhaps by using another method of definition?
template <class TYPE>
class List<TYPE> {
...
public:
List<TYPE>& operator +(const List<TYPE>& ) const;
...
}
class String:public List<char> {
}
Thanks,
-Jeff
-- modified at 14:36 Wednesday 16th August, 2006
|
|
|
|
|
Skippums wrote: I attempted that piece of code, and received an error like "Using non-static member of List<char>"
OOPS: In fact I did a mistake in writing the function: List::operator+ returns a List, not a String as i did.
Skippums wrote: Is there a way to make them equivalent, perhaps by using another method of definition?
No, that's basic C++ scope overriding.
class A
{
void f1(int) { ... }
void f1(double) { ... }
};
class B: public A
{
void f1(double) { ... }
};
It is not B::f1(double) overriding A::f1(double) .
It is B::f1 masking A::f1 , whatever f1 represent in A or B .
You can have as many f1 variant you want in A , but as you declare f1 to do whatever thing in B , f1 in A is "masked, when working with B scope".
-- modified at 11:32 Thursday 17th August, 2006
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
i have a problem in my progress bar (attached in a Dialog) everytime the dialog lost its focus or became inactive its switches to sort of not responding mode, thats why you will not be able to know or determine the status or the %finish of the progress bar ..
|
|
|
|
|
Are you running your progress bar using a separate thread ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
It is not the progress bar which is responsible of that. The problem is that you probably start a lenghty process in the main thread and in that case, your GUI is unable to process messages (thus doesn't respond to user actions).
If you want to avoid that, you have to start a new thread in which you will compute your lenghty operation.
|
|
|
|
|
I have taken a char ch; variable. I have opened a file in read mode and reading each character at a time and printing it into a text box.
It prints evety character except 'tab'. Its printing a pipe sysmbol instead of giving a tab space. How to solve it?
Please Help.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
How do you know that it is a tab character (I mean in what editor does the char be displayed as a tab?) ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
check for ^I for tab space (if any tab is present)
never say die
|
|
|
|
|
To my knowledge, edit controls do not support tab characters. I suggest that you replace each tab character encountered with an appropriate number of spaces.
Another idea would be to use a rich edit control.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I have been doing a bit of work with 'wav' files, and in the format the number of channles can be defined. I have only found mono\stereo files so far - is it possible to have 4 channel 'wav' files (quadraphonic)?
Even better would be 5.1 surround sound (or are the extra (Centre & Bass)channels derived from the L\R mix?)
If it is possible, can anyone point me in the right direction to get a sample 4 channel 'wav' file so I can have a play?
Sorry - probably not the right place to ask this, but not sure where to
Regards
69 Bay
-- modified at 6:36 Wednesday 16th August, 2006
|
|
|
|
|
Hi All,
When we include a class, the wizard creates two files (.h and .cpp) in the class's name. The .cpp file starts with like this:
#ifndef _FILE1_H
#define _FILE1_H
#include "File1.h"
#endif
Hope this is a way to avoid including the file (.h) more than once in the application. How this .cpp file is getting related with its corresponding .h file? Because, we include only .h file.
Kindly let me know that how can compare this with "# pragma once" and more about "pragma".
Thanks in advance,
Sarvan AL
*** Live Life To Its Fullest ***
|
|
|
|
|
Sarvan AL wrote: Hope this is a way to avoid including the file (.h) more than once in the application
Yes, it is. However, the #ifdef/#define##endif should normally be located inside File1.h, and not where it is called.
In File1.h:
#ifndef _FILE1_H
#define _FILE1_H
.. here the declarations
#endif
In the .cpp
#include "File1.h"
Otherwise, you need to reproduce the ifndef/endif block for each include of the File1.h, which is no good practice (unless you have some hardware limitation, like the h file is located on some network that is lengthy to be accessed and that the simple fact of going inside the include lasts 5 seconds or more).
#pragma are directive to the precompiler, e.g. the software that runs one time through the code before the compiler. It replaces all occurences of #defines with their real value, copies the content of includes inside the cpp file, etc..
The precompiler can be given some directives using #pragma, such as #pragma disable(warning:1020) which disables warning 1020. Meaning and sometimes existence of pragmas depends on the compiler.
#pragma once is a directive that (for visual c++, but also other compiler) says that the file in which it is located must only be included once. It is equivalent to the code block I've provided you with.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Hi Rage,
Thank you for your detailed explanation.
Sarvan AL
*** Live Lift To Its Fullest ***
|
|
|
|
|
Adding to Rage explanation on #pragma once, the header file is scanned only once(internally it is maintained in a table)where as
Rage wrote: #ifndef _FILE1_H
#define _FILE1_H
.. here the declarations
#endif
if the header file is included more than once in a .cpp file,it is scanned that no times
-- modified at 8:04 Wednesday 16th August, 2006
-- modified at 8:05 Wednesday 16th August, 2006
never say die
|
|
|
|