|
Google.com by Google
led mike
|
|
|
|
|
And just how in the world did you go about finding that one?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks for reply. actually I am using Data Structure and Algorithms in C++ by Adam Drozdek. Is it the right one to start of.
Regards
amit
modified on Thursday, April 24, 2008 2:38 AM
|
|
|
|
|
in which college are you studying??
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
astalavita baby :
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
I using VS2003 - and i have some project that i wrote that have dll output.
I want to compile this dll and in the compile time i want to create also lib file - but the lib file will be in path A and the dll in path B.
How can i do it ?
Thanks.
|
|
|
|
|
Set different path for dll and lib file. I dont have VS 2003 so this may not be exact. DLL file path is in under Linker -> General -> Output file and LIB path is under Linker -> Advanced -> Import Library.
-Saurabh
|
|
|
|
|
I need to move some file to other place after compile the file - how to do it ?
thanks.
|
|
|
|
|
In the post build event write : copy "source file" "destination path".
-Saurabh
|
|
|
|
|
Hi all
I am trying to serialize my classes efficiently.
I would like first to set/get members of my classes AT ONCE to memory
i.e. using not a list of >> for each members but something to be called at once!
Have you any suggestion or path to follow?
Many thank
CODE I WANT TO AVOID
void Deserialize( std::iostream& stream, CMyClass& obj )
{
stream >> MyClass.iMyMember1;
stream >> MyClass.iMyMember2;
stream >> MyClass.iMyMember3;
}
|
|
|
|
|
Have a look at the write function sample of this page [^].
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
|
|
|
|
|
Wow! That's veeeeery nice function!!
Do you think that function sputn do the same i.e. is equivalent for std::streambuf?
Seems very good for efficient and quick operations!
P.S. If you Pass for Amsterdam and we will have a beer! ah!ah!
Manustone
modified on Thursday, August 28, 2008 6:13 PM
|
|
|
|
|
manustone wrote: Do you think that function sputn do the same i.e. is equivalent for std::streambuf?
Well, for serialization I would use read .
BTW, keep the beer cold, I'm arriving.
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
modified on Wednesday, April 23, 2008 11:03 AM
|
|
|
|
|
Hi Pallini
Many thanks for good suggestion!
Bye Manustone
|
|
|
|
|
You're welcome.
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
|
|
|
|
|
Using write function in stream classes you can only serialize classes having POD (Plain Old Data). If there are pointers in the class then this will not work. What I do is in each class which I want to serialize I write Read and Write functions which will do the serialization. If there is only POD then those function can use stream write function else I serialize each variable separately.
class Foo
{
void Read(std::istream& in);
void Write(std::ostream& out);
}
Then you can write serialization functions as
void Deserialize(std::iostream& stream, CMyClass& obj)
{
obj.Read(stream);
}
-Saurabh
|
|
|
|
|
Hi Saurabh
Many many thanks for suggestion!
Bye Manustone
|
|
|
|
|
If I have an HBITMAP, is it possible to use TextOut() or etc to write text to that bitmap?
|
|
|
|
|
|
Create a memory DC
Select the bitmap into it (saving the previously selected bitmap)
Render your text on the DC
Select the saved bitmap back into the DC (this un-selects your bitmap from the DC)
Destroy the DC
The only catch here is, if the HBITMAP is not a DIBSection, then the DC will need to be
compatible with the bitmap or selecting the bitmap into the DC can fail.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes its possible you need to a handle to DC(Createompatibledc) and for other steps see Mark's answer.
|
|
|
|
|
Hi all,
I am trying to convert a long file path ( more than 255 chars, in UNC format) using GetShortPathNameW API. But It fails, saying that
"The filename, directory name, or volume label syntax is incorrect."
Anybody knows what is issue here?
|
|
|
|
|
Probably the filename or the directory name or the volume label syntax is incorrect, I suppose.
BTW have you read the following note (from MSDN [^]):
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File.
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
|
|
|
|
|
I have used GetShortPathNameW (unicode version ) only
sample path is as follows:
"\\?\UNC\server_ip\ONTAP_ADMIN$\vol\vol0\home\testdir4\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"
modified on Wednesday, April 23, 2008 10:25 AM
|
|
|
|
|
Well, I get error 3 (the system cannot find the path specified), that is quite different. How do you call the function?
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
|
|
|
|