|
Set a flag for the client socket: 'discardAllButTheStopAnswer ' would be a good name.
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]
|
|
|
|
|
Like C-Pallini is already implying, flushing the messages just means receiving them in your application and then choosing to not do anything with them (discarding), until you reach the STOP message. In other words, after pressing the Stop button you need to at least keep receiving the messages until the STOP message arrives.
|
|
|
|
|
Is is possible to create a dbx file from number of eml file programatically?
|
|
|
|
|
Anything is possible if you know the file format.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
what is result of the formula?
1 & 0x01+1*3
it is zero actually.
I guess it equals 1&(0x01+1*3).
I need a priority table of C operators to know c operators' priority for +-*/&|~%
normally, * and / are executed before + and -.
how about others, do you have a link for this?
|
|
|
|
|
Your guess is right: here you are "C++ Operator Precedence"[^].
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]
|
|
|
|
|
Hi all,
I want to store values from a file into a map (which I have selected) with three fields, namely number, name, model. With map can I do that? Since I can use a value pair how can I handle the third parameter.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Pack name , model into a struct or alternatively, into a std::pair .
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]
|
|
|
|
|
Of course. That solved my issue.
Thanks!
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You are welcome.
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]
|
|
|
|
|
Sure,you just want to change the resouse of the picture.
|
|
|
|
|
|
Actually the number is the key, and I used struct for the rest.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi,
Does anyone know how to open files as read-only in VS2008 like you used to be able to do in VC++6.0? The number of times I have edited the wrong file, saved it and screwed up a totally different project
There is a drop-arrow on the Open button but it doesnt do anything.
Ta
|
|
|
|
|
Apply 'Read Only' property to all the files/folder you don't wanna to change.
|
|
|
|
|
Hi all,
I want to read a user input with spaces, say "Hello World". With scanf how can i do that. Because all the time after the space, I cannot read the input.
scanf("%[^\n]", name);
scanf("%s",&name);
fscanf(stdin, "%*s%99[^\n]", name);
None of the above solve my issue.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You can't do it with scanf - use gets[^] instead.
Edit before someone else says it: of course gets isn't safe to use since you can't specify the buffer size, so use fgets[^] instead.
modified on Wednesday, September 7, 2011 2:51 PM
|
|
|
|
|
Simply I tried the following, but it didn't work either
char test[1024];
printf("\nTest ");
gets(test);
I appreciate your help all the time...
CodingLover
|
|
|
|
|
scanf("%[^\n]", name); works.
If it does not, then check how name is declared.
It should be something like char name[1024];
|
|
|
|
|
I did exactly the same, but didn't work mate.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Run this and tell me what you get -
char name[1024];
scanf("%[^\n]", name);
printf("[%s]", name);
|
|
|
|
|
It simply print some garbage characters. Even in debug it'll not looking for the user input.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
That's strange.
It works as expected for me.
Are you running it from a console application?
If you can give me more details like the environment that you're using and the type of program you're using, I could try to recreate the issue at my end.
|
|
|
|
|
Sorry for the late reply!
Yes it was a console application. I did this on VS 2008.
However when I use cin instead of scanf, works fine.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Same code worked fine for me am also using vs2008
|
|
|
|