Hi all
I was trying to understand pthread cond and signal api functionality. So from online tutorials, I found that when a thread is want to wait for any condition to satisfy, it will go into wait...
Type: Posts; User: Bargi
Hi all
I was trying to understand pthread cond and signal api functionality. So from online tutorials, I found that when a thread is want to wait for any condition to satisfy, it will go into wait...
Hi I change the code, but getting issue when initializing in constructor.
The code is crashing. I have taken pointer.
But for every new object its intializing to 0 and program is crashing.
...
Ya. I got that point. In that case, if I create for object type B, then instead of having count of 1, it will show count of first type object (say first type object is type A).
Hi All
I have created a smart pointer implementation. Below is the code. Could you guys have a look and suggest that approach is correct or not.
One point I want to mention that, for count I...
Thanks a lot Laserlight...:)
So it means, when we inherit, protected constructor was by default get to be accessed from derived class constructor. But if tried to create a new object, in derived class, it is same as creating new...
But what I have read is that, constructor,destructor,assignment operator and copy constructor do not inherit to sub classes. Isn't it contradict?
Then how, A() constructor get called when B object was created. It was too protected in class A, and was called from B class constructor?
Hi all
I was thinking on the behavior of inheritance. So I have declared protected constructor in base class. In derived class, I inherited base class as private, I have created a function which...
Hi
I have read about inheritance and templates. What I have understood is that,both of them provide reusabilty of code, then what is the basic difference between them and which one should be used...
Hi all
I am learning about the private inheritance and found a little bit confusing.
In all other type of inheritance we can reuse the code in derived class but not in case of private( unless we...
How can I make abc to give permission to bargi for write permission?
Hi,
I am writing a shell script for copying file from one user account directory to another.
The code is:
#!/bin/sh
src_path=/home/bargi
tgt_path=/home/abc
cp ${src_path}/a* ${tgt_path}/
Edeco,
Actually I have to generate random with unique key.
Currentky I am using sytem time with date,month,year,hr,min,sec,picosec.
With this type of seed I always got the unique number.
That why...
Adak , Is that you mean that, if I divide random no. with 100000,it will give me always 6 digit no. and more than that.
Since currenlty I am getting random no. of range 5,6,7,8,9,10,11 digit number....
Hi ,
I am facing a problem in using recursion.
I am creating random number of 6 digit for some purpose.
The check I have to made is that the generated random number should be of 6 digit,if it is...
Thanks For help ......
Its really solve the problem
Hi ,
I am working in a problem in which I have to print elements in array using random number logic.
The logic is that the elements of character should be printed randomly from the array. I...
thanks laser for your help.......
I want some help from regarding C programming....
Actually I have just started working on C specific project and there are lots of pointer memory intialization...
Thanks for help....
It mean that I have to declare the size of str....
But it printing something this:
Hi ,
I have a problem with strcat...
The code is:
char *str="/home/bargi/";
strcat(str,"temp.txt");
Increased the size but result is same....??
Should I write single character and iterate whole string??
Still not working...
Giving segmentation fault
Hi ,
I am writing a code for writing a whole string to file,but it is running in infinte loop ??
Means the final string is written infinte times.
The code is:
yes ,I can do that......
but string can increase later...