|
Unless > and < were eaten in your post, it looks like the syntax for the template is incorrect. It should be something closer to:
template< typename T >
T max( T x, T y ) Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Yes you are right. The angle brackets were eaten up in the post. Cedric Momen pointed this out in his response.
jhwurmbach suggested that I avoid pre compiling the headers. It worked! Thanks every body.
taintransit
|
|
|
|
|
taintransit wrote: 1 template T max(T x, T,y)
Look at this line closely.
taintransit wrote: any ideas on what could be wrong?
For a hint, try renaming the macro.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Stop! No!
Don't try to precompile your C-Headers.
Instead, switch off precompiled headers, either for the whole project (in the project properties) or for single files (in the properties of the file)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Thanks a million jhwurmbach. You have just halted my one week of sleepless nights.
Thanks also to David Crow, Cedric Moonen and James Twine for all your suggestions.
taintransit
|
|
|
|
|
How can I add an extra button control on the title without affecting existing system menu or without disturbing existing Close button and Icon.
When I tried to handle Non clent paint message, previous button changes its color and state which I don't want.
Is there any way to do this?
msc
|
|
|
|
|
|
Hi Experts,
Could anyone tell me how to detect the Microsoft office outlook installed on my machine (any version)?
Thanks in advance.
|
|
|
|
|
post this in os/sysadmin forum and delete from here.
i will answer it there.
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I am debugging the program by adding the break point at some function.Suppose I want to find out which function is called when I perform particular actions. Is there any method to identify which function is called at particular event.Because I can not predict which function gets called so I can not add break point at that function.Can we add break point at all function in project by any short cut method of IDE. Please send me solution if anybody have.
Thanks in Advance
Atul
Atul
|
|
|
|
|
Set a breakpoint at the position where the function is called and then use the debugger command "step into".
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Hi jhwurmbach ,
The main problem is the I can not predict which function is called. So where should I add break point.
Thanks in Advance
Atul
Atul
|
|
|
|
|
Atulmahajan wrote: The main problem is the I can not predict which function is called
Why so ?
|
|
|
|
|
Atulmahajan wrote: The main problem is the I can not predict which function is called. So where should I add break point.
Well, if you don't know your software !!!
Read the code, put break points where you think they should be, if they don't trigger, put them somewhere else. You should know at least what your software do!
|
|
|
|
|
Atulmahajan wrote: I can not predict which function is called
Why not?
You have the statement where the decision occurs. There you put the breakpoint.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
only one way.
add break points at the start of all the functions and see
|
|
|
|
|
Is your application multithreaded ?
Regards,
Paresh.
|
|
|
|
|
hi im trying to get the confgui to work in Jxta-C
but when i try to build the project i get a error saying
error C2664: 'jxta_advertisement_get_string' : cannot convert parameter 2 from 'const char [5]' to 'Jxta_index *'
from this line
peername = jxta_advertisement_get_string((Jxta_advertisement*)pa,"Name");
i beleive that jxta_index comes from another file which constructs it as below
struct _jxta_index {
JXTA_OBJECT_HANDLE;
JString *element;
JString *attribute;
char *parm;
Jxta_object *range;
};
can anybody tell me how i should change the jxta_advertisement_get_string line so that it will work
thanks
|
|
|
|
|
pds8475 wrote: can anybody tell me how i should change the jxta_advertisement_get_string line so that it will work
Give it the adress of a Jxta_index as second parameter, instead of the char[5] "Name".
Just like the error-message says.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
hi sorry but im not sure how i would find the address of Jxta_index could you please explain
|
|
|
|
|
To get the address of a variable, you use the so called "address-of"-operator: a <big>&</big> prefixed to the variable name.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
thanks still doest work tho if i use &Name i get a undeclared identifier error if i use &Jxta_index i get a error saying illegal use of this type as an expression
|
|
|
|
|
I have really no idea how jxta works, but the compiler clearly says it doesn't want a string literal here, but the address of a variable of the type Jxta_index .
Whatever that is. And whereever you get that from.
Does the documentation state the call should take a string as the second parameter? Then David Crow could be right:
Exchange "Name" with _T("Name").
Wrapping with _T("") should become a habit with string literals.
This way, in Unicode, the literals are unicode strings, in non-unicode they are char*.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
sorry i have not been able to find any docunentation regarding the jxta_advertisement_get_string method or Jxta_index
|
|
|
|