|
How did you come to code the function call the way you did?
Fact is, the function takes a pointer to a Jxta_index . Not a string.
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
|
|
|
|
|
|
I don't want to sound harsh but I really think you should learn the C++ basics first. When I look at your replies, it seems that you don't really know what you are talking about.
Your function expects to receive a pointer to a specific structure (Jxta_index) so, why are you passing a string instead ?
You should fill a structure like that and pass its address to the function. And honnestly, I don't think anybody here will be able to help you more than that (because probably not a lot of people here know what jxta is).
pds8475 wrote: if i use &Jxta_index i get a error saying illegal use of this type as an expression
Once again, this is basic C++: Jxta_index is a structure declaration, so as your compiler says you cannot use it as an expression. You need to create an instance of it:
Jxta_index myStruct;
Then fill it appropriately (should be documented somewhere I suppose) and then pass its address to your function.
|
|
|
|
|
just to make it clear i didnt write this a developer at sun did
|
|
|
|
|
Yes, I know that you didn't write these functions. But honnestly this is really basic C++: this is just a function that accepts a pointer to a structure as parameter. How to use it should be explained somwhere in a documentation.
|
|
|
|
|
hi there is very little documentation on Jxta-c and after searching the net i can only find 3 references to Jxta_index and they are talking about other classes that use Jxta_index
|
|
|
|
|
pds8475 wrote: there is very little documentation on Jxta-c
There is a complete API-Doc[^] (automagically made from the code by doxygen). It is properly linked at the Projects website.
I must admit that the documentation seems to be wrong for jxta_advertisement_get_string() . The brief description and the "Parameters" section seem to contradict.
Probably the Parameters-comment has not been updated - thebane of doxygen-like documentation.
char* jxta_advertisement_get_string ( Jxta_advertisement * ad,
Jxta_index * ji
)
Many fields of an advertisement struct can be represented as a character string, which may be obtained by this function.
Parameters:
Jxta_advertisement * ad
char * key for advertisement field desired
Returns:
char * representation of value corresponding to key.
Warning:
Returns a copy that must be freed.
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
|
|
|
|
|
|
pds8475 wrote: error C2664: 'jxta_advertisement_get_string' : cannot convert parameter 2 from 'const char [5]' to 'Jxta_index *'
This is usually a Unicode vs. ANSI error. Try putting an L in front of the string literal.
[edit]
Now that I've gone back and read your post, my suggestion was way off. Sorry about that.
[/edit]
"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 thanks for that but now i get a error message saying cannot convert parameter 2 from 'const wchar_t [5]' to 'Jxta_index *
|
|
|
|
|
It must be something else then. Rather than code something up to find out for sure, I was just taking a stab at something common.
"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
|
|
|
|
|
no problem iv been having a lot of trouble getting Jxta-c to actually work
just about got its shell to run but it wont connect to the network found that it uses a xml file called Platformconfig for its settings and the Confgui which is the problem in question is supposed to generate this
|
|
|
|
|
Try:
Jxta_index j;
peername = jxta_advertisement_get_string((Jxta_advertisement *) pa, &j);
"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
|
|
|
|
|
thanks for that but that gives me a error saying no appropriate default constructor available
|
|
|
|
|
What statement is generating this error? What Jxta_index constructors are available?
See here for more.
"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 i just searched ther whole of the solution but all i can find is
typedef struct _jxta_index Jxta_index;
and
struct _jxta_index {
JXTA_OBJECT_HANDLE;
JString *element;
JString *attribute;
char *parm;
Jxta_object *range;
};
|
|
|
|
|
Hi Friends,
I developed a SDI application.Then i included the two Forms.
I am able to split the window statically, But I dont know how to fix the size of those scroll bars. I want to make them fixed,should not be moved.
So please any one help me out..
Thanks
Shiva
-- modified at 7:48 Wednesday 10th October, 2007
|
|
|
|
|
shivarudrayya wrote: But I dont know how to fix the size of those scroll bars.
Confusing...
shivarudrayya wrote: I want to make them fixed,should not be moved.
Want to fix the splitter position?
- NS -
|
|
|
|
|
Ya exactly..
Reagards
Shiva
|
|
|
|
|
Deriving a class from the CSplitterWnd and override the OnMouseMove, OnLButtonDown, etc and skipping the default call to CSplitterWnd::OnMouseMove, CSplitterWnd::OnLButtonDown, etc., might be a solution.
- NS -
|
|
|
|
|
Hi,
My Code
-------
int key_status=0;
key_status = System::Convert::ToInt32(myReader->get_Item("status"));
While executing the above code i am getting the below error
E:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xlocnum(965): error C2177: constant too big
Plz some one suggest me to solve it
Thankyou
Know is Drop, Unknown is Ocean
|
|
|
|
|
The first step would be to look at Line 965 of xlocnum and see what constant values it is using and where it is getting them from. One of them is too large. I guess one you've defined rather than one MS defined themselves. To determine which one a breakpoint on the above mentioned lien would certainly be helpful. If you can't get any further you can at least post the result of your investigation. Good luck.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
I cant able to trace the code. Coz this is an dll, also while building this itself i am getting error.
Know is Drop, Unknown is Ocean
|
|
|
|
|
So you have a built Dll you can't debug even though you have the source, and the source doesn't build so it can't actually be the source the Dll was built with. There are clearly multiple problem here. Take it a step at a time and post details of the errors if you can't fix them. You need to be standing on firmer ground ( more sure of what's happening ) before anyone can give you much help I'm afraid.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Exelioindia wrote: While executing the above code i am getting the below error
E:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xlocnum(965): error C2177: constant too big
Not possible. C2177 is a compiler error, not a runtime (i.e., execution) error.
"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
|
|
|
|