Search:

Type: Posts; User: chakra

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    3,997

    *** stack smashing detected ***

    *** stack smashing detected *** - this is the error I got when I ran my program. After doing some google, i found this happens for the buffer overrun. I looked into the program line by line to find...
  2. Replies
    19
    Views
    2,670

    As per your code inPut = getNumber(); ...

    As per your code


    inPut = getNumber();


    getNumber() is supposed to return something. Here you are assigning it to inPut, So make sure it has the same return type for the getNumber.

    Your...
  3. Replies
    19
    Views
    2,670

    ......

    ......
  4. Replies
    19
    Views
    2,670

    first thing... inPut is declared as num. I hope...

    first thing... inPut is declared as num. I hope you have changed it to int.
    second getNumber declaration void getNumber(void); it is not matching with the way you are using..

    your declaration...
  5. Replies
    85
    Views
    11,821

    What I meant was if suppose four bytes has the...

    What I meant was if suppose four bytes has the value say x'00558844'. So I will take the first byte(from the left), x'00'. Since it is zero I will add 8 to the result and now go with second byte...
  6. Replies
    85
    Views
    11,821

    Thanks for the explanation on the lookup table....

    Thanks for the explanation on the lookup table.
    for the 32 channels, as said I can go byte by byte starting from msb . I will proceed to the next byte, only if the current byte is 0.For every...
  7. Replies
    85
    Views
    11,821

    yeah something like that. if the value > 128,...

    yeah something like that. if the value > 128, then 1
    128>value>64,return 2.

    But I cannot go with this. As 8 channel is just an initial value. It might get up to 32 channels. In that case writing...
  8. Replies
    85
    Views
    11,821

    Bits and bytes- Please help.

    Hi,
    First of all very sorry for coming up with such a vague title. I couldn't think any better title for this thread.
    I have been asked to use a byte for representing 8 different channels. Every...
  9. Thanks! Yes, You are right. I missed the...

    Thanks!
    Yes, You are right. I missed the function declaration in the header file.
    Thanks to all for their kind help.
  10. I am using gcc. Your code doesn't give me any...

    I am using gcc. Your code doesn't give me any error or warning.. Job is char *. Let me see what is wrong with mine.
  11. ' assignment makes pointer from integer without a cast "

    Hi All,
    Greeting!
    I am getting this error " assignment makes pointer from integer without a cast" for this line.



    root=addtree(root,job);


    Declaration for addtree is as follows
  12. Replies
    32
    Views
    6,342

    If you want to do the sorting and grouping...

    If you want to do the sorting and grouping through the program,i would suggest take a look on tree structure or Map. Both of them are mentioned already in the previous posts. I am not sure about how...
  13. Replies
    9
    Views
    3,554

    Thanks!. I changed the code as said and in...

    Thanks!.
    I changed the code as said and in future I will keep this in my mind.. :)
  14. Replies
    9
    Views
    3,554

    I too felt the same when i posted it for the...

    I too felt the same when i posted it for the first time.I was thinking whether is there really a need to post the entire code.But when I removed the other codes keeping only the problematic part, i...
  15. Replies
    6
    Views
    1,054

    Yes, I was looking for binary mode and fwrite did...

    Yes, I was looking for binary mode and fwrite did it well. :)
  16. Replies
    6
    Views
    1,054

    thank you.

    thank you.
  17. Replies
    6
    Views
    1,054

    writing an int field to a file

    How to write an int variable to a file in c?
  18. Replies
    32
    Views
    6,342

    Reading files :you can use FILE functions. FOPEN...

    Reading files :you can use FILE functions. FOPEN and fgetc.

    space delimiter : you can use the isspace function

    Grouping and sorting can be done with a tree structure.
  19. Replies
    9
    Views
    3,554

    I have modified the code as said by mutandis. I...

    I have modified the code as said by mutandis. I have changed the malloc functions as needed. Changed the count_elements to be reusable.

    And regarding the design, the init() function has to be...
  20. Replies
    9
    Views
    3,554

    Reason for using static on most of function is...

    Reason for using static on most of function is because i do not want these functions to be visible outside this file. Whatever i have done so far, i do not think is not even 50% of total concept ....
  21. Replies
    9
    Views
    3,554

    Thanks. I will correct the malloc statements....

    Thanks. I will correct the malloc statements. Regarding the type casting i followed what i read from K & R. After going through the FAQ, I got the useful information. thanks.I will do the necessary...
  22. Replies
    9
    Views
    3,554

    Problem with Free.

    Hi,
    Let me first introduce my self. I am chakravarthi. I am not new to this forum, but i am not very active participant. Today I come here seeking for help on the below code.I have no clue about the...
  23. Replies
    52
    Views
    17,755

    well in that case try this double sine(float...

    well in that case try this


    double sine(float x)
    {
    int i,n;
    int sign = -1;
    double sum = x,power=x,fact = 1.0,psum=0.0;
    for (i = 1; fabs(fabs(sum) - fabs(psum)) > 0.0000000001; ++i)
    ...
  24. Replies
    52
    Views
    17,755

    double sine(double x) { int i,n; int...

    double sine(double x)
    {
    int i,n;
    int sign = -1;

    double sum = x,power=x,fact = 1.0;
    for (i = 1; i < infinity; ++i)
    {
    power = power * x *x;
    n = (2*i+1);
  25. Replies
    52
    Views
    17,755

    scanf("%s", &fileOutName); - not correct. ...

    scanf("&#37;s", &fileOutName); - not correct.

    fileoutname is an array,so your statement should be

    scanf("%s", fileOutName);
Results 1 to 25 of 30
Page 1 of 2 1 2