|
jon_80 wrote: ...I was planning to use std::list structure to implement a linked list:
Why? std::list is already a (doubly) linked-list data structure.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am going through some of my old code making it more unicode friendly, basically adding TCHAR instead of char , when I came across the _fcvt() function. Now most stl string functions have their ansi/unicode equivlents, but it appears this one does not, it only returns a char* . Does anybody know of a similar function that will do the job?
|
|
|
|
|
It's somewhat esoteric. That may be why it never got a Unicode version.
Perhaps you can get somewhere with _sntprintf ? That will of course include the decimal point, which _fcvt doesn't. You will also have to allocate a buffer for it to write into, which you didn't have to with _fcvt .
|
|
|
|
|
Hello,
Im trying to write an applicatn which would draw upon a fullscreen game some text (a simple in-game text), and I came across the information I should hook up Direct3D functions and this is what I did using an example (hooking up CreateDirect9Device), but this function is executed only once at the beginning, and I am wondering which function should I hook so that I would be able to draw the text inside a already running game ? (And then how can I write the text ? with what commands ?)
Its very important to me, and I would appreciate any help in that.
Regards,
Pawel
|
|
|
|
|
Well, you can use Direct3D to draw 2D or 3D text to the screen in a game. Once you have the Direct3D device pointer you can call methods on it. So, you just need to do some research on the Direct3D API to figure out which functions you need to accomplish your task.
Deus caritas est
|
|
|
|
|
thx I found the answer. // IDirect3D::PResent and Flip
|
|
|
|
|
Is it possible to use the mouse scroll wheel to scroll up and down a menu in a console application instead of using the keyboard to select a menu choice. If possible, how do I do this?
Thanks,
Kristian
|
|
|
|
|
You could try trapping the mouses wheel message in your message loop, check if a menu is open, then set the item.
|
|
|
|
|
Using VS2005:
So there I am happily coding along, using classes that I wrote 6 years ago. The class in question has the following general content:
class CMyClass
{
public:
CMyClass(CString sFileName);
CMyClass();
virtual ~CMyClass();
...
};
I didn't feel like dealing with pointers, so I defined this:
class CMyOtherClass
{
CMyClass m_myClass;
...
};
The compiler is complaining that there's no default constructor for CMyClass, but there is (the bodies of both constructors are in the CPP file).
What am I missing?
"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
|
|
|
|
|
dont you have to put almost like a 'forward definition' for CMyClass before CMyOtherClass ?
(sorry John, I cant remember the syntax - its simple and I should be able to ...)
ok - found this - it may be what I was thinking of
http://www.codesampler.com/miscsrc.htm[^]
look for "Forward Declarations"
'g'
-- modified at 7:46 Saturday 26th August, 2006
|
|
|
|
|
I can see no problem with your code - can you post more of it?
Steve
|
|
|
|
|
John, you're getting lazy.
I did a test compile of the code you gave and it compiles fine.
I hate to say it but it looks like there is something else you forgot to post.
If CMyOtherClass didn't have a constructor (and CMyClass::CMyClass() wasn't defined) then you would get 'no default constructor for CMyOtherClass' (even though it's CMyClass w/o default constructor).
So, i assume CMyOtherClass has a defined constructor.
If CMyClass::CMyClass() didn't exist in .cpp (and CMyClass() is in header) then you'd get a link error - 'unresolved external CMyClass::CMyClass()'.
If CMyClass() not in header, but CMyClass::CMyClass() in .cpp then you'd get your error 'no default constructor for CMyClass' but you'd also get 'CMyClass::CMyClass() overloaded function not found in CMyClass'.
The only case where you _only_ get the error 'no default constructor for CMyClass' is when CMyClass() isn't in either the .h or .cpp files.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
hi Everybody,
I have been doing an application in which i have splitted the window into Two panes .By selecting the buttons in first pane,we can change the views in the second pane.Now My doubt is i have added buttons with icon's and color in both the panes of the splitter window.First as we run the application dy default some view will be there in the second pane.If we change the views of the second pane by selecting different buttons in the first pane,views will change ,but the color and icon of the buttons are being lost in the second pane.Can any body help me in this problem so that if we change the views also the Buttoon's color and icon does not loose.
Thanks in advance,
Radhika.
|
|
|
|
|
hi,
The buttons i used in my application are created by using the logic of the buttons in Buttonst aricle in vc++.
Thanks,
Radhika.
|
|
|
|
|
Hello everyone,
When using dir command to list all the files in a directory, for example, here is an output,
--------------------
C:\temp\test>dir
Volume in drive C is C
Volume Serial Number is CC95-21FF
Directory of C:\temp\test
2006-08-26 16:47 .
2006-08-26 16:47 ..
2006-08-26 16:47 0 foo.txt
2006-08-26 16:47 0 goo.txt
2 File(s) 0 bytes
2 Dir(s) 3,082,964,992 bytes free
--------------------
What I want to get are, foo and goo (files ends with .txt). I know how to do this in a programming way, parsing and parsing ...
Could anyone have any ways which does not need programming, for example, by using some Windows commands (does there are any commmad like grep or cut on Linux)?
thanks in advance,
George
|
|
|
|
|
If you want to find files from your code use CFileFind
else...install unixutils and you'll have ls and grep (and lots of other usefull things)
|
|
|
|
|
Thank you eusto!
I think using CFileFind is a programming way, right? But I am looking for a way which is simply enough without any programming efforts.
unixutils makes senses. I will study it. Thank you again!
regards,
George
|
|
|
|
|
|
|
|
Yes, I am using a utility which ports grep like UNIX commands to Windows. Seems that Windows built-in commands do not have such rich functions.
regards,
George
|
|
|
|
|
I ahve a created a client server application useing TCP.
and another application useing UDP (methods: SendTO(),ReceivedFrom()),
in both applications the data will send to teh server and server receives the data. But i havent found a much difference by changeing the protocals.
programetically what is the diff betweem UDP&TCP?
|
|
|
|
|
Hello Ramanand,
ramanand_bulusu wrote: programetically what is the diff betweem UDP&TCP?
Actually programetically not much more difference.
The difference is releted to use of bandwidth, multicasting, reliablity of data send/receive & other.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Divyang Mithaiwala wrote: The difference is releted to use of bandwidth, multicasting, reliablity of data send/receive & other.
i heard that UDp wont give the aknoldgements for sending the data.
does it right?
-- modified at 5:59 Saturday 26th August, 2006
|
|
|
|
|
In UDP there is no need to give ACK. so it is not reliable.
That's why udp take less bandwith for realtime transmission.
& It's easy to send multicast data via udp.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|