|
p_1960 wrote: Is there any standard way to merge xml files
No, because the way the merge is done depends on the contents of the XML files you use, and how you want to join them.
p_1960 wrote: XSL
You could use XSL - you'd want to get to know the document function[^], which allows you to read any XML document in an XSL stylesheet. This[^] looks like a good explanation with samples.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My code snippet is something like this one,
class Base1
{
public:
Base1()
{
cout<<"Base1()"<<endl;
}
virtual void method()
{
cout<<"Base1::method()"<<endl;
}
};
class Base2
{
public:
Base2()
{
cout<<"Base2()"<<endl;
}
virtual void method()
{
cout<<"Base2::method()"<<endl;
}
};
class Derived:public Base1, public Base2
{
public:
Derived()
{
cout<<"Derived()"<<endl;
}
void method()
{
cout<<"Derived::method()"<<endl;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
// Derived *d = static_cast<Derived *>(new Base1); // works fine
// application crash at Base2::method call, even though Base2() constructor is invoked
Derived *d = static_cast<Derived *>(new Base2);
d->method();
return 0;
}
With Base1, application works fine. But when I try to use Base2, application crashes at method() call.
And if I change the sequence in Derived class declaration to...
class Derived:public Base2, public Base1
then Base2 object works perfectly but Base1 crashes.
So, my question is why up-casting (or down-casting, not sure about specific word) works only with primary base class and not with secondary base classes??
|
|
|
|
|
Try reinterpret_cast insted of static_cast.
I dont know the reason why it is so. I will look it in details and update this post later.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
|
Thanks, the article is really good.
|
|
|
|
|
how to implement text search logic in my application.
|
|
|
|
|
Please elaborate question what exactly you want?
I think This Link[^] may give you some guideline.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
i want to implement text search..it can be of all document or from current page only..up or down the document..like find dialog in standard applications.
|
|
|
|
|
ali kanju wrote: i want to implement text search..it can be of all document or from current page only..up or down the document..like find dialog in standard applications.
You still didn't provide any useful information. You are talking about pages and document, what are you talking about exactly ? How is your data stored ? Is this a big string, a list of strings, ... ?
You also have to separate the problem in two distinct jobs: your program should first search for the matches (without showing that to the user), and then the information has to be displayed to the user.
Both aspects really depends on which datatype you are working with, how you display the information to the user, ...
So, if you want some useful help, you will need to provide a lot more of useful information.
|
|
|
|
|
can you please elaborate your requirement?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
There's a surplus of vagueness here. Unfortunately, all I can offer is the shotgun approach. See strstr() , strchr() , CString::Find() , and string::find() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all,
i m creating my application with any other name,now i want to change my exe name.
Please tell me how can i change it and after changing the name whenever i build the solution its build with new name not from old name.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
You can change it from project properties.
please see Project Properties -> Linker -> outputfile
Change value for 'outputfile'. You will get desired outputfilename exe.
Hope this will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
Can anybody please help me to read a video stream from an IP address assigned to Avtech 4 channel MPEG4 DVR.
The DVR is connected with 4 webcams.
DVR stores video stream in a raw format on connected Hard Disk Drive.
DVR is also connected to a ethernet switch and it throws video streams on assigned IP address on 80 port.
i want to read that video stream from DVR IP address and port 80 using C, C++, or MFC.
Thanks & Regards,
Kunal.
|
|
|
|
|
I am using Edit control to enter text . now at run time I stretch the edit control width and height .
but problem is that font size do not increase with respect to edit control . how can I do that
Trioum
|
|
|
|
|
You have to create a new font with appropriate size and set it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You will need to change the font of the edit control.
You could start here - CWnd::SetFont[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi Folks:
I've done Google searches, looked for books on Amazon, looked up this topic here at this website and have more questions than answers.
Quite simply, I will have a webcam (Logitech 9000) installed on my Windows 2003 business server platform.
All I want to do is to be able to "receive" the live video stream from my camnera from a client browser over the net. I think I need some client HTML as well as some server code to do this?
Any help appreciated.
Steve
steve morris
|
|
|
|
|
The AMCap program in the DirectX samples of platform SDK is a good starting reference.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
1.return String("abc");
2.String temp("abc");
return temp;
Thanks.
modified on Sunday, June 14, 2009 12:06 PM
|
|
|
|
|
In terms of overall semantics, no difference. With a decent, modern, optimising C++ compiler, they should result in the same object code - the 'named return value optimisation[^]' would make sure of that.
Without that optimisation, there will be extra string constructor and destructor calls.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
There is no difference. Both return the address of a temporary variable on the stack.
Best Wishes,
-David Delaune
|
|
|
|
|
As far as I understand, a call to CreateCompatibleDC(NULL) is equivalent to a call to CreateCompatibleDC(hdc) for some hdc (hdc is not NULL, of course).
The question is how to get hdc in the second call so that it is equivalent to the first one?
I actually need a handle of the window which is associated with the hdc. I was going to use WindowFromDC(hdc) for that porpose. Is it possible to find hdc and then to find window handle in that way?
The point is that some dictionaries like stardict use the technique of API hooking to translate text. They can translate a word when a mouse hovers over the text. In my case I don't use mouse position, I need to filter some text according to what window it belongs to. I thought it was possible to use DC for that purpose. The idea was to intercept DrawText, TextOut etc, get HDC from their parameter and then by call to WindowFromDC get window handle. The problem is that some application create DC in memory by CreateCompatibleDC(NULL) and do text output to the memory DC. The solution seemed to be in intercepting CreateCompatibleDC(NULL) and getting somehow the real DC by calling some (unknown to me) API-function from the intercepted CreateCompatibleDC, and finally getting window handle from WindowFromDC( <real dc=""> ).
modified on Sunday, June 14, 2009 1:53 PM
|
|
|
|