The issue has been resolved..
Actually the sockets were getting freed but same fd was getting reallocated immediately.
As the same socket fd...
I am facing a wired problem.The socket descriptor is not free (entry persists in /proc/pid/fd)
even though it is closed.
Can you plz brief in how getDrunk() function works ..
Along with use of
steps = rand() % numSteps;
dir = rand() % 2; // 0 is back...
I tested your code with some fixes and it worked fine..
Fix 1 :while(1)
printf("\n\tPress 1 - ADD New...
Re: How to take different types of data from a text file to an array(2-D) using point
Jst need some info..
As per your req..You will have...
Thanx a lot for the response
I have an executable say a.out.
My requirement is that ..At a time only single instance of a.out be executed
Is that possible in...
You have used the wrong format specifier.
%d is used for int
%f is used for float
Make these modifications and you may get expected result...
I like your posts and your rational approach towards resolving issues.
I have been c /c++ domain past 3 years.My interest lies in debugging...
i know this sounds strange..
but I am looking at
b) ptr itself...
Consider ,the following code
unsigned int num =10;
unsigned int * ptr = #
however,When i look into ptr ,the address stored in "ptr"...
U have declared class LinkedList incorrectly..
Add the following closing brace and semiclon at the end of the class
Thanks for the reply..
However,the size of structure would be 8 as 3 bytes would be padded after "char c" member
I want to know whether compiler implements bits padding in Classes as in structs??
if my struct is
hey!!thanks for the reply..
However, the issue was related to compiler optimisation to make the structure word align..
Giving some details about...
I have a structure as
struct S1ap_SetUpRequest:public S1ap_MessageType
U cannot pass a non static member function to pthread_create as non static member function includes an implicit "this" pointer.
It fails as u might have not modified
Even here u'll need to consider the same
The issue is in scanf
scanf reads the input after enter/return key is pressed.But the newline generated by it is not consumed by scanf.Hence...
Your code crashes becoz of line ..
car * car_array = new car[(car_num - 1)];
Say for example..
In your case memory will be...
Separate names with a comma.