php scripts are run on the server... after they are run, the server generates html and sends it to the client.. so unless your program is running on the server, i'm going to have to say no.. it...
yes that is true. but i was wondering what the most efficient way to do it is. i might have to do it many times and i might be dealing with a very large number of...
well.. making intallable programs is a whole other art that i know nothing about.. but to run an exe file, look into ShellExecute(..) and/or system(..).
i just tried to look for a tutorial on how to deal with strings and char * in c++ .. found this: http://cplus.about.com/od/beginnerctutorial/l/aa051202a.htm
from a quick glance, it seems there are many things wrong with the code..
- you declare your array in the loop- the array is declared:
iteration 1, len 0 - illegal
iteration 2, len 1
and so...
but you will find some useful information on creating scokets, sending messages here:
http://www.tutorialized.com/tutorial/Using-Internet-Sockets/456...
try putting an infinite while loop at the end of both your functions, so that the program does not terminate.. see if you still have the error.. that way you might be able to determine if this is in...
you do realize that the reason they chose UDP is probably so that you have to implement some sort of reliability into it? i mean.. if this were not a school project, you woudl definitely choose tcp...
some might say this is a stupid question and i'm trying to be a smart a**, and when i read this tomorrow after sleeping, i might too.. but i am dead serious!
make a header file with the function prototypes and include the header file in teh source file. then you can include the header file wherever you want to call the functions.