|
To much time lost:
newPtr = (POINTNODE *) malloc( sizeof(POINTNODE) );
|
|
|
|
|
That too.
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
Your sig is offensive to people with runny noses and smelly feet and you might want to consider changing it
|
|
|
|
|
Your includes at the top got cut off, probably because it interpreted < and > as HTML (hint: use < and > for angle brackets)
I suspect you don't have the right file included for malloc . You need to include stdlib.h and malloc.h.
Note: if your program is C++, though, you can use new instead of malloc and it is much easier. e.g.,
newPtr = new LISTNODE;
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
How are you going to free the memory from malloc?
Thank You
Bo Hunter
|
|
|
|
|
You use the free command:
void free(void *p)
where p is the pointer to memory you have allocated with malloc
|
|
|
|
|
Yea I know that is what I am asking.
Where is the void* member to free?
free( p ) takes void* and it has to
be memory that was alotted with malloc.
Or am I wrong.
Just an observation.
Thank You
Bo Hunter
|
|
|
|
|
hello,
i want to know how can i get all of the IP in my local network . i say that others 's IP and COMPUTER NAME ,I want to get . I get some code ,but they don't work well,there are some errors .
waiting your help!
thanks
|
|
|
|
|
think about the reason why no1 is answering...
Don't try it, just do it!
|
|
|
|
|
Hellin wrote:
I get some code ,but they don't work well,there are some errors .
And those errors would be???
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Is this accomplished by calling a function with the amount of space I want between lines or do I have to individually output lines to get the desired effect?
Thanks
I'm drinking triples, seeing double and acting single
|
|
|
|
|
I had a suspicion there was a font setting in the LOGFONT struct, but I was wrong. You're going to
have to bite the bullet and use DrawText (...., DT_CALCRECT, DT_NOWRAP(?) ) etc. to do the lines
individually.
Iain.
|
|
|
|
|
How take pathes to a few files at the same time, using CFileDialog??
|
|
|
|
|
|
|
How can i access and change a symbol in a CString variable??
|
|
|
|
|
CString overloads the array access operator [], so you can access it and modify characters as if it were just a character array.
e.g.
CString sTmp( _T("abcdefgh") );
TCHAR ch = sTmp[1]; // ch = 'b'
sTmp[4] = 'q'; // sTmp is now "abcdqfgh"
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
|
Hi guys,
I am a beginner coder, and I would like to gain some experience with Visual C++. I have been coding for a while in C++, and C, and now I would like to have a small project to work on. Something for a beginner, that is an easy to tackle problem, but smthg that will get me experience...Yeah! I am in desperate need of getting experience...do you happen to know of a project that you might have done, or a website where I can find such small project ideas?!
Thanks a lot, and hope to hear from you!
|
|
|
|
|
a lot of schools post computer project assignments for their students to complete online...mine does.
http://www.cse.msu.edu/~cse231/Projects/
thats the url of the beginning c++ course's project assignments at my school.
*.*
cin >> knowledge;
|
|
|
|
|
Hi,
I have trouble with variable where used in thread function. I defined thread function such as;
UINT Processor(LPVOID lpParameter)
{
.
.
.
return ulCOMObjReturnValue;
}
STDMETHODIMP COLAP::GetState(long SystemID)
{
.
.
.
DWORD ulExitCode;
bThreadState = ::GetExitCodeThread(pQueue->hThread, &ulExitCode);
return ulExitCode; // Set return value
}
pQueue->hThread has thread id, but GetExitCodeThread() function can not return right value except debugging.
Thank you for your responses.
|
|
|
|
|
return (DWORD)n; try this
|
|
|
|
|
Hi,
I have installed VS.NET 2003.
I have generate a C++ application.
My application has not the Windows XP Styles even if the operating system is
XP Pro.
I want to know if I have to select an option in the VS.NET IDE to get the XP
Style.
I have read an article here who explain to uilize a manifest file with
Visual C++ 6.0. I have do it and it is working.
Do I have to do the same with VS.NET 2003 ?
Thanks,
Claude
|
|
|
|
|
Feel free to correct me at any time as I am still trying my best to learn this API. I know that there is a SOCKADDR structure that is able to hold data and family type. I also know that there is a SOCKADDR_IN structure that is able to hold an address, a port number, data and a family type. I have a sendechorequest function set up like this
int CSSPingDlg::SendEchoRequest(SOCKET s, SOCKADDR_IN lpstToAddr);
Now comes the interesting part. Inside this SendEchoRequest function I make a call to the sendto() function. What I take issue with is the fifth parameter of sendto(); which requires a SOCKADDR * that is supposed to contain the address of the host to which to send the data. The problem is that my ping program requires that I use a SOCKADDR_IN structure which is able to hold important information like the IP address of the host. Is there a version of sendto(); that will allow me to pass a SOCKADDR_IN instead of a plain SOCKADDR? Could it be that I am just not using sendto(); correctly.
All I know is that I want to send data to the host specified in the SOCKADDR_IN structure that I have passed to my sendechorequest function. How do I do that?
|
|
|
|
|
From MSDN doc of sendto()
The Microsoft TCP/IP Sockets Developer’s Kit only supports the Internet address domains. To actually fill in values for each part of an address, you use the SOCKADDR_IN data structure, which is specifically for this address format. The SOCKADDR and the SOCKADDR_IN data structures are the same size. You simply cast to switch between the two structure types.
Steve
|
|
|
|