我有
run(){
...
struct sockaddr_in from;
int i = recvpacket(buffer,from, fromlen)
...
}
recvpacket(char *buffer, struct sockaddr_in from, int fromlen)
{
//udp recvfrom stores the address of the sender in from
}
我在 VC++ 中得到以下运行时错误
runtime check failure - the variable 'from' is used without being initialized
我应该通过引用传递,我应该怎么做?