|
Thanks for this nice and beutiful code. Thanks to all....All are helpfuls. Thanks again.
kamalesh
|
|
|
|
|
Hi all,
I have made a list control which is of report style, what i want is when a particular condition is met the whole row colour should change to red. and if more than 1 row satisfy that condition all row's colour should change to red.
can anybody help me in this
thanks in advance
|
|
|
|
|
|
Hi,
Try here[^] and/or here[^]
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
hi all,
i am having a class and i want to impliment 2 overloaded constructors as:
in .h file:
Document(const char* filename=NULL);
Document(const wchar_t* filename=NULL);
in .cpp file
Document::Document( const char* filespec )
{
m_pdoc = NULL;
load( filespec );
}
Document::Document( const wchar_t* filespec )
{
m_pdoc = NULL;
load( filespec );
}
the load function is also overloaded.
but it gives me warning saying:
warning C4520: 'Document' : multiple default constructors specified
and error saying:
error C2668: 'Document::Document' : ambiguous call to overloaded function
where i am going wrong?
|
|
|
|
|
Guess what happen if you don't pass anything to your constructor ? How will your compiler be able to select one of the two constructor ?
Remove the default parameter so that the compiler isn't confused in the case where you don't pass any argument.
|
|
|
|
|
|
in .h file:
Document(const char* filename=NULL);
Document(const wchar_t* filename=NULL);
The reason is here. You specified two default ctors because both of them are supposed to be called when no arhuments are passed to a ctor. So remove the default parameter value (=NULL) from one of ctors [or both of them].
--
=====
Arman
|
|
|
|
|
sandeepkavade wrote: Document(const char* filename=NULL);
Document(const wchar_t* filename=NULL);
Why not replace them with:
Document( const TCHAR *filename = NULL );
"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
|
|
|
|
|
I have to transfer file via UDP. Please send me any sample codes or links or suggestions regarding this.
S.Yamini
|
|
|
|
|
I think its not good idea to send a file with UDP.
See this[^] thread
|
|
|
|
|
I have to use only UDP. Please send me any sample codes or link or suggestions
S.Yamini
|
|
|
|
|
|
You *can't* use UDP. UDP does not guarantee every packet will be delivered, which means the file received on the other end will most likely be corrupted.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yes you can. You would need to implement some sort of "packet received" reply. If the sender didn't get it in time it would resend the packet. Such protocols exist.
Steve
|
|
|
|
|
That's a lot more work than it's worth. In fact, if such code exists, it would be a lot better to buy a library than to reinvent that particular wheel. Essentially, you're trying to turn UDP into TCP/IP. There's a reason both protocols exist.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: In fact, if such code exists, it would be a lot better to buy a library than to reinvent that particular wheel.
Agreed.
Steve
|
|
|
|
|
yaminisridaran wrote: I have to use only UDP
You can do it, but by the time you implement all the checking for dropped datagrams and out-of-
sequence datagrams, you'll have rolled your own TCP
Some tips: UDP datagrams can arrive out of order or not arrive at all. That means every
datagram will need a header containing some kind of info indicating it's position or index or
whatever so you can reassemble the data on the receiving end. You need to be able to resend
datagrams that don't arrive at all and allow for packets arriving out of order. This is the
stuff TCP does for you.
Good luck!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Can u send me the sample coding for TCP Server and TCP client
S.Yamini
|
|
|
|
|
|
'nuf said already. I would suggest too, "Don't use UDP"!
Anything I will say you will bring it down to whatever you want.
|
|
|
|
|
yaminisridaran wrote: I have to use only UDP
I would be interested to hear why?
As many (Mark, etc) told there is some overhead in re-inventing TCP datastream capability with UDP, not mentioning that you can't use HTTP proxies to get out of a firewalled networks. Since you haven't stated your requirements I wonder why you want to do this.
|
|
|
|
|
Hi,
I'm a beginner in programming in C++ so there's a lot of searching and trying to do.
I've been trying to retrieve the directory that contains the project file out of VC++. I searched around and it should be possible with the namespace VCProjectEngine. There are also some examples on the net but i haven't found one yet in C++.
So for the moment I haven't been able to make a working program were i can obtain my project directory (i want to place there a cfg file with some parameters).
I've tried it with VCProject.ProjectDirectory but can't get it to work.
Can anyone help me with an example on how it works/?
Thanks in advance!
|
|
|
|
|
What's your exact problem and purpose? Why to bother with VCProjectEngine at all?
--
=====
Arman
|
|
|
|
|
I have a small application that's converting an xml file in another format. In a .config file i wanted to specify file location, where to get the xml files and where to place the output files so it's not hard coded in my application.
This .config file is placed in my application directory.
How can i find it? I have seen some sugestions and tried several things but don't succeed in it. What's your proposal?
|
|
|
|