|
what is i_net() function?
what is nthol() function is it supposed to be ntohl()? Which takes a u_long parameter so why would you be getting it from a CString object? I cannot understand what you are trying to do.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
YEAH U R RIGHT....
I MISTYPED THE CODE....
CODE IS...
DWORD dw=ntohl(inet_addr(strIP.GetBuffer(MAX_PATH)));
strIP IS A CString class...
error message i m getting is...
C2664: inet_addr()..can not convert parameter 1 from "unsigned long *" to "const char *"
i m using eVC++4.0
|
|
|
|
|
cool_frozen wrote: strIP IS A CString class
cool_frozen wrote: inet_addr()..can not convert parameter 1 from "unsigned long *" to "const char *"
inet_addr() take a "const char*" parameter. If your project is Unicode you cannot get an ASCII char pointer directly from CString. There are string conversion macros that have changed with versions of VC,ATL,MFC. Using the latest version would look like this:
CString strIP(_T("122.23.220.44"));
CW2A charIP(strIP);
inet_addr( charIP);
See the documentation[^] for more complete information about the different macros and versions of them.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Suppose i want 2 add a waterfall animation in VC, how is it done,im using opengl as the graphics library.
When the goin gets tough then tough gets going
|
|
|
|
|
Hi,
Simply add an Animate control on ur dialog
Then add a member variable for it.
Add "avi" in resource( IDR_AVI )
CAnimateCtrl m_aNimate;
m_aNimate.Open( IDR_AVI ) ;
m_aNimate.Play( 0,-1,-1 ) ;
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
its not the dialogue based,its a Win32 application...it wont support the things u send ......
now wat to do?
thx
NooR
|
|
|
|
|
hi, well mine is not a dialog based application.
When the goin gets tough then tough gets going
|
|
|
|
|
Do you want a realistic waterfall, or just the illusion of a waterfall?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
i want to add a realistic waterfall
When the goin gets tough then tough gets going
|
|
|
|
|
Well...that's pretty advanced, but, typically with any water effect, you need a water texture, and then you animate the texture by changing the texture coordinates. If you want realistic waterfall, you'd also need a particle engine to create mist.
I don't have any links to tutorials or code, maybe google for "opengl water tutorial" or poke around on http://nehe.gamedev.net/[^] (that's the second time I've linked to nehe today, what's up with that?!)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
yeah i hv checked that link, i want ur verdict on a thing i-e i have downloaded an animated waterfall , itb has 20 frames. now i was wondering may be i shud load each frame using threads, shud i go for multithreading
When the goin gets tough then tough gets going
|
|
|
|
|
Multi-threading is not the approach I would take. Is the animated waterfall an .avi? If so, check out Lesson 35 on the nehe site.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
how do v attach a file
When the goin gets tough then tough gets going
|
|
|
|
|
To a message post? I don't think you can. Provide a link instead.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
i want 2 send u the image how 2 attach files
When the goin gets tough then tough gets going
|
|
|
|
|
Don't want your file. Just tell me what format it is.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
the format is GIF
When the goin gets tough then tough gets going
|
|
|
|
|
So it's an animated GIF file? I don't know how to load an animated gif.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
ok thnx any way but if u do get some info related to this do let me know
When the goin gets tough then tough gets going
|
|
|
|
|
hi i want to know,how can we load the movie clip in visual c++ using the graphics library OpenGL.
thx
Regards
NooR
|
|
|
|
|
|
in a string of text "in this- string" how can i tell if the char to the right of the - == a space without aserting?
-- modified at 23:15 Tuesday 11th July, 2006
|
|
|
|
|
It depends on what api you are using. Is it an stl string? or a plain old char buffer or ...
Basically what you want to do is find the index of the '-' char then if it is greater that 0 test if the char at that index - 1 is ' '
You should take care using assert as it is stripped out in release builds.
Objects in mirror are closer than they appear
-- modified at 23:24 Tuesday 11th July, 2006
|
|
|
|
|
are you trying to remove it? or showing a message?
you can use CString.Find function to find a character within the given string. this will return the index of '-' charcter wtihing the given string.
e.g
CString strText = "in this - string"
int nPos = strText.Findd('-');
if((nPos>=0) && strText.GetLength > nPos+2)
{
strText.RemoveAt(nPos+1);
}
HTH
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Patte
|
|
|
|
|
i want a space on both sides of the - so it the string is "some- text" i want it to end up as "some - text" i know i can use insert but "some- text" alread has one space and it would end up with 2 on one side.
what i need is
"some-text" = "some - text"
"some- text" = "some - text"
"some -text' = "some - text"
inserting a space i can do i just cant figure out how to tell if/or where a space is in the string.
|
|
|
|