Guys,
you can not say
if(sum - (double)intsum == 0.0) no no!
double delta = 0.005; // use your value here
then always compare those two with your delta!
x - y < delta in this fashion.
Don't forget that float or double keeps approximation to the real value, for example float x=1.0; could be...
Assuming that tokens[3] contains "1234567890"
following happens:
after strcpy(xpto, tokens[3]) xpto has "1234567890"
after strncpy(var3_4, xpto+2, 2) var3_4 has "34..garbage.." - do not forget that strncpy does not insert terminating 0.
What about var1_2 - you don't...
it is called interprocess communication. You did not indicate whether these apps are on the same machine or not. There are pipes, messages, sockets, shared memory: many different IPC facilities. It is very much OS dependent.
On Unix I would use messages or tcp sockets.
Another way is to use .netrc file,
where one can put following:
machine hostname
login username
password pwd
put from_file to_file
quit
So, when you say
ftp hostname
it would automatically login and put a file there.
Remember, that you are revealing username/passwd, so be carefull.
Michael.
I am writing a program that performs multiple ftp functions and trying not to use any script.
In SCO we have good ftp_api (SLIB) functions, but there is no function corresponding to APPEND ftp command.
Any idea how to implement APPEND without scripting?
I'd hate to get, delete, locally append...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.