thank you for the response. i was despairing of any reply...
i thought fork was for processes. i need to use threads - pthread library.
i know how to create threads, locks(mutex) but not...
Type: Posts; User: pari
thank you for the response. i was despairing of any reply...
i thought fork was for processes. i need to use threads - pthread library.
i know how to create threads, locks(mutex) but not...
can anyone help me please....?
hi all,
i want to create a pipeline in solaris using c POSIX. i have found lot of theories on what is a pipeline on the net but couldn't find any examples or even guide to implementing it.
i...
thanks salem.. i understood abt realloc & how not to lose the memory i have already allocated if realloc fails. but can u clarify just 1 thing...... when i say *str[i] am i saying goto the index &...
hi all,
i have written a simple prog tht reads user's input as string and allocates memory as and when a char is read. can anyone tell me why re-alloc fails when i execute thi below code. thanks in...
it works!!! thank u so much. i was trying to figure this out for the last 6 hrs. shows how dumb i am. :-) thanx again!
ohmygod thts abs great! u r a genius!
but i have a Q. can i not pass a copy of aCar instead of the address? will it not then be solved?
yes i do & this is it....
void vPrintList(const CarInv *cInv)
{
int i = 0;
int index = 0;
char carType[6][10] = {"", "SEDAN", "COUPE", "SPORT", "SUV", "TRUCK"};
for(i = 0; i <...
no. aCar is just an object..... Car aCar. do u want me to post the whole code?
yes u r right. i don't even know anything abt linked list. gotta do it this way.... & i can add records too now. it writes to file, loads to memory...... but the only thing which it isn't doing is...
i still havn't leant about linked lists.......sorry!
i printed out maxSize & it was 0. so i did a malloc. is this right?
cInv.pList = (Car **)malloc(sizeof(Car *));
if(cInv.pList == NULL)
{
printf("malloc failed\n");
return 3;
}
i tried tht too.......but doesn't work..... i don't know wht else to do. I have been trying to figure it out...but no such luck. thanks anyway :-)
hi,
I am reading from a file which has 6 records(for now) and loading them into a structure. but when i try to print it back, it only prints the last record 6 times. it prints all 6 records right...
thank you both. i got it!
i found this on website. please, what does this mean?
http://www.eskimo.com/~scs/C-faq/q4.8.html
Question 4.8
I have a function which accepts, and is supposed to initialize, a pointer:
...
hi all,
i have a doubt for this simple program. i'm passing just a copy of p to changeNum function. why is it changing the original? i know its pretty silly but i can't understand this. please tell...
ok...... here it is....if i can figure out how to go thru each character then i can complete this prog. thanks for looking!
#include <stdio.h>
#include <string.h>
#define MAX 30 ...
i have a program where user enter a float val(123.45) & this is stored as string. i use strtok to break it into 2 parts. period is the delimiter. now i have to print the value in words that is One...
thank you so much. i implemented the second maethod u told me. it works just great!!!
i used static variables in printCalender() but couldn't re-initialize them for the next 3 months & so on... abt calling printCalender() just once for 3 months, sld i change the code so that i print...
hi all,
the foll code prints a calender for year between 1900 & 2100. i have used 3 global vars - dayCount1, 2 & 3 to keep track of days. is there an alternative to using these global vars? any...
thanx a lot Salem. I figured out how to find the start day of each month & to display it properly with spaces. sometimes i just think i can't think anymore & thts when i need a lil help to push me...
yes....... but i'm only able to print it vertically.... like
Jan
----------
----------
Feb
----------
----------
& so on. After the newline at Jan end I'm unable to go to the first line &...
um......... could you be a bit more specific as to how i can print? thanx