|
john curtin wrote: int _int tmain (int argc,_TCHAR* ARGV[])
should read int _tmain(int argc, _TCHAR* argv[])
|
|
|
|
|
john curtin wrote: int _int tmain (int argc,_TCHAR* ARGV[])
The bold _int is an alien, remove it.
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]
|
|
|
|
|
CPallini wrote: The bold _int is an alien
Where do you think it came from? Maybe CSS knows ...
|
|
|
|
|
Richard MacCutchan wrote: Maybe CSS knows
Know and CSS in the same sentence, now that's alien.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Hello to everyone.
I want to read line by line an input file (leer_datos).
In the input file (leer_datos): If the first character of each line is '|', then I copy the whole line and paste it in an output file (escribir_datos).
In the input file (leer_datos): If the first character isn´t '|' then I go to the next line in the input file (leer_datos).
My code:
#include <stdio.h>;
int main(void)
{
FILE *leer_datos, *escribir_datos;
char muestra[50];
leer_datos = fopen("input_file.txt", "rt");
escribir_datos = fopen("output_file.txt", "wt");
while ( (!feof(leer_datos)) && (!ferror(leer_datos)) )
{
muestra = getc(leer_datos) ;
if (muestra == '|')
{
fgets(muestra, sizeof(muestra), leer_datos);
fputs(muestra, escribir_datos);
fputs("\n", escribir_datos);
}
}
if (fclose(leer_datos) != 0)
printf ("Hay problemas al cerrar el fichero de lectura de datos\n");
if (fclose(escribir_datos) != 0)
printf ("Hay problemas al cerrar el fichero de escritura de datos\n");
}
...but it gives some errors and I don´t sure about it works fine.
Anyone could help me, please!?.
|
|
|
|
|
muestra = getc(leer_datos) ;
if (muestra == '|')
{
fgets(muestra, sizeof(muestra), leer_datos);
fputs(muestra, escribir_datos);
fputs("\n", escribir_datos);
}
In the above code if the first character is NOT '|' you still have the remainder of the line of text to read next time round the loop. It would be better to read each line into muestra and just test the first character if (muestra[0] == '|') ...
|
|
|
|
|
programmer202 wrote: ...but it gives some errors...
Really. Are you keeping those to yourself?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I want to know the maximum client count that a server can accepts (TCP/IP or socket).
Of couse, client count depends on server's hardware and software - this is my question:
Based on general good computer hardware and Windows, what are common and "best" software (OS and others) for supporting more TCP/IP clients? what is maximum possible client count related to the software?
BTW: please only post reply related to my question.
modified on Thursday, October 15, 2009 5:23 AM
|
|
|
|
|
includeh10 wrote: BTW: please only post reply related to my question.
BTW please only post questions related to the forum!
|
|
|
|
|
F u c k you if you still make nonsense.
|
|
|
|
|
includeh10 wrote: F * * k you if you still make nonsense.
Keep this sort of language at your home. May be people over there will like it very much. But, it won't be tolerated here.
Your query is a basic networking query and has nothing to do with C/C++. And you "demand" that people should give you an exact answer? So, Richard told you that this isn't the right forum.
I've reported your message as abusive.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks for your support
|
|
|
|
|
You are a Gold member of Code Project and you think this is a good attitude to display?
|
|
|
|
|
Well if you use the definition that Merriam Webster[^] has inexplicably placed at the first only the gold part doesn't fit.
The latest nation. Procrastination.
|
|
|
|
|
Sounds about right
|
|
|
|
|
Once again, great show of your stupidity.
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]
|
|
|
|
|
As important as server hardware and software abilities is your internet connection ability. More important than either is the nature of the protocol - how long does a connection last, how much bandwidth does a connection require, is the data transfer bursty or continuous, is a request processor intensive, ... .
The following is a bit out of date but should give some idea on max _possible_ connections.
http://tangentsoft.net/wskfaq/advanced.html#maxsockets[^]
The current best practice for optimal server programming uses IOCP to manage sparse requests from a large number of connections with a relatively few number of threads. Windows implements this in the kernel. UNIX variants used to implement this in user space, not sure if this is still true.
It could be 100's, or it could be 10-15+ thousand, regardless of the OS.
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
|
includeh10 wrote: what is maximum possible client count related to the software?
I think that it would be practically unlimited (limited only by the availability of resources); but I may be wrong.
[Mod] OK, I've removed the portions that aren't directly related to your query.
“Follow your bliss.” – Joseph Campbell
modified on Thursday, October 15, 2009 5:41 AM
|
|
|
|
|
|
I don't like saying it, but that's the truth. At least socket classes are OK if you're targeting a small number of clients and performance is not an issue. It at least "works".
But the MFC thread sync classes is something that I've had far too many issues with and it's almost 4 years now and I don't touch 'em with a 10 foot plastic pole since then. Thread syncing is always done the win32 way in my little world.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
If you want to know how many threads your computer can create, please try it home.
|
|
|
|
|
includeh10 wrote: If you want to know how many threads your computer can create, please try it home.
If you just want to put on a great show your stupidity, please do it at your home.
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]
|
|
|
|
|
includeh10 wrote: Based on general good computer hardware and Windows, what are common and "best" software (OS and others)
Isn't Windows already an OS ?
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]
|
|
|
|
|
an exe (A) exectutes (runs) another exe (B).
I hope A is waiting at executing call point untill B is created or failed, then A continues to process its code bellow call point.
Simply said, the execute call (ShellExecute or others) is similar to SendMessage(...) in sync-way.
How to do it? CreateProcess()?
|
|
|
|