I'm trying to simulate a simple 4 layer reference model for communication between two hosts. However, I seem to be getting a simple error, which I can't figure out.
The Part of my code is:
And the following error I'm getting refers to packetnum = ceil(x);Code:int* layer2(int* buf,int* bufsize, int flag) { if(flag == 1) //Transmit { int packetnum = 1; if(bufsize[0] > MAXDATA) { double x = (((double)bufsize[0])/MAXDATA); packetnum = ceil(x); }
[Warning] converting to `int' from `double'



LinkBack URL
About LinkBacks


