|
Just a wild guess here,
Is inet_addr what your looking for?
|
|
|
|
|
Well, for starters, your missing a closing parenthesis.
secondly, no need to use CString::GetBuffer() when you are needing a const char* since CString already has an operator for that. Only use CString::GetBuffer() when you need a buffer to pass into something. It won't hurt you here except you forgot the corresponding ReleaseBuffer() but that's a different story.
Thirdly, C++ is case sensitive so that call to strIP.Getbuffer() won't get you anything except another error to add to the list. strIP.GetBuffer() is probably what you meant.
Fourth, I took your code and fixed the above statements, included the #include "winsock2.h"
and made reference to ws2_32.lib and I was able to compile it and run it so I'm not sure what your fighting...
CString strIP="192.168.1.1";
DWORD dw=ntohl(inet_addr(strIP));
TRACE("Big Endian dw = %u\n",dw);
Any additional data in the time since your last post?
-- modified at 1:57 Tuesday 18th July, 2006
|
|
|
|
|
thanks for the help bob....
i will see whether ur code will help or not....but im sure it will help...thanks again......
regards..
frozen
|
|
|
|
|
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
|
|
|
|