|
Sorry led mike,
Could you clarify which of your related statements resolves my issue of generating only one line of mian.i file please? I read your reply again but not finding anything related to this question.
regards,
George
|
|
|
|
|
You appear to be changing the question. In the previous post it was:
George_George wrote: I do not know why finding where size_t is defined is too hard.
Now it is:
George_George wrote: my issue of generating only one line of mian.i file
I don't know what that means and I don't care. I believe you are being deliberately obtuse and have exhausted my patience. Good day.
led mike
|
|
|
|
|
Hi led mike,
Your final decision is, you do not know whether size_t is a built-in type or not?
regards,
George
|
|
|
|
|
It is fine, Maximilien. But how do you find out in which header file it is defined? I found a couple of definitions.
regards,
George
|
|
|
|
|
from io.h (and crtdefs.h)
#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif
|
|
|
|
|
Hi Chris Losinger,
How do you prove my code is using definitions of size_t in crtdefs.h -- I have this suspecision because there are a couple of definitions of size_t I found? The go to definition or go to declaration in VC never works...
regards,
George
|
|
|
|
|
Hello everyone,
The command syntax from debugger help document, but after reading the document, I am still confused what are the legal value range for the 2 parameters? The debugger help document does not cover the legal ranges. Where to look-up?
!error Value [Flags]
regards,
George
|
|
|
|
|
timeval timeOut;
timeOut.tv_sec = 0;
timeOut.tv_usec = 3000*1000;
fd_set fdread, fdExcept;
FD_ZERO(&fdread);
FD_ZERO(&fdExcept);
FD_SET(sock,&fdread);
FD_SET(sock,&fdExcept);
int iRet = 0;
iRet = select(0, &fdread, NULL, &fdExcept, &timeOut);
if(FD_ISSET(sock,&fdread))
{
int iRecv = recv(sock, strRecv, 512*1024, 0);
}
|
|
|
|
|
use:
while( .... )
{
select( ... );
recv( ... );
}
to receive a lot data.
because of the large TCP data block will be splitted to small pieces during transfer, the recv()'s size may not equal to send()'s size at one time.
Erwin Yuan
|
|
|
|
|
As Erwin mentions, you can never assume you'll get all the bytes you
request in a single call to recv(). You must keep calling recv() until
you get the number of bytes you're expecting.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I want to print decimal values if characters are non-printable.
how to find out non-printable characters in a string ? is their any 'c' api?
Thanks,
Sakthi
Nice things do nice works
|
|
|
|
|
Have a look at the locale functions, such as isalpha() and isalnum() here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
isprint [^]?
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
[My articles]
|
|
|
|
|
I need toi create the slider control in the shape of circle.
|
|
|
|
|
Does this help?[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
|
how can i set button size according to text size dynamically, means in run time text of button is changed using setwindowtext() method but size of button remain static either text is small or larger so how to fix it,
pls help
|
|
|
|
|
use SetWindowPos() or MoveWindow() function to resize the button. To find out how much length a text takes, use the CDC::GetTextExtent() function or CDC::DrawText() function.
|
|
|
|
|
thanks for da reply but will u plz send me code using these methods as never used before
|
|
|
|
|
ani_ikram wrote: u plz send me code using these methods as never used before
So you dont want to learn vc++?
Check the MSDN for the help of each function, do some sample and ask us if you face some problem while using that functions. Those functions are really easy to understand. Give a try..
|
|
|
|
|
Its not hard you need to a handle to your button.
|
|
|
|
|
Hello I still am having this sscanf problem, last topic died out.. there is no bump feature so I have to post a new one. SIGHS
Anyways as the post was..
struct Pos {
int x
int y
};
char line[66] = "spawn = 1648\t3411\t3536\t0\t3412\t3537\t3410\t3510\t2\tCRAWLING HAND\0";
int npcId;
Pos coords;
int heightLevel = 0;
Pos moveRange1;
Pos moveRange2;
int direction;
sscanf(line,"spawn%*[ ]=%*[ ]%d%*[\t]%d%*[\t]%d",&npcId, &coords.x, &coords.y);
printf("npcID = %d\n", npcId);
printf("coords x = %d\n", coords.x);
printf("coords y = %d\n", coords.y);
sscanf(line,"spawn%*[ ]=%*[ ]%d%*[\t]%d%*[\t]%d",&npcId, &coords.x);
printf("npcID = %d\n", npcId);
printf("coords x = %d\n", coords.x);
printf("coords y = %d\n", coords.y);
I need to parse threw the line and get all parameters.. getting the first 2
npcId and coords.x works fine.. but the more I add sooner or later the first one npcId starts to fail... but coords.x doesn't fail. can someone tell me whats wrong in this strange behavior
|
|
|
|
|
Cbadboy wrote: Hello I still am having this sscanf problem, last topic died out...
Because it was found to work as expected here.
Cbadboy wrote: sscanf(line,"spawn%*[ ]=%*[ ]%d%*[\t]%d%*[\t]%d",&npcId, &coords.x); //* = ignore
You are missing an int argument to sscanf() . The result is that it sees the last %d and is popping an extra int from the stack.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
man???
the one thats missing was missing on PURPOSE and it works.. but when I add the non-missing ones.. as you see above.. are not missing that doesn't work!
something to do with structs and sscanf()
|
|
|
|