Search:

Type: Posts; User: manutdfan

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    3,023

    Yes sorry I was so unclear, that was what I...

    Yes sorry I was so unclear, that was what I wanted to do. In maple you can just type 1/N mod R and it gives the correct answer 1089etc however wasn't sure how to do this in C.

    Does the extended...
  2. Replies
    6
    Views
    3,023

    Yeh I guessed this was the problem, how would I...

    Yeh I guessed this was the problem, how would I go about anything other type of arithmetic to get the required result.
  3. Replies
    6
    Views
    3,023

    Problem with modulo calculation

    Right, am having a problem when using a modulo calculation in my program.

    Trying to do the calculation below,

    N = 1073741827
    R = 4294967296

    N' = (1/N) (mod R) = 1789569707

    The code I...
  4. Replies
    8
    Views
    1,654

    Cheers guys, that was the problem have just...

    Cheers guys, that was the problem have just resorted to using a for loop to calculate pow value instead.
  5. Replies
    8
    Views
    1,654

    Thats really odd, i've tried re-writing it into a...

    Thats really odd, i've tried re-writing it into a single function which i've posted below and I still get the same problem.

    im using Dev C++ to compile in windows. Cheers for looking at it.

    ...
  6. Replies
    8
    Views
    1,654

    Converting string to int

    Hey,

    I have written a piece of code to do as the title says, but I seem to have a problem in that any odd number of digits is converted wrong. eg. it converts 25 correctly but not 125.

    it...
  7. Replies
    3
    Views
    3,246

    thanks I thought it would error because of the...

    thanks I thought it would error because of the different data types.
  8. Replies
    3
    Views
    3,246

    Converting words into ASCII values

    I was just wondering whether it is possible to convert characters into their ASCII values or values in the alphabet easily without needing a load of if statements.

    The only way I can think of...
  9. thanks, thats great it works now

    thanks, thats great it works now
  10. no sorry I am trying to remove all the...

    no sorry I am trying to remove all the apostrophes from my list so when it is searched they don't appear in words.

    so I was trying to compare each character in the list with an apostrophe to...
  11. so i should use x[b] == '"' because it...

    so i should use

    x[b] == '\"'

    because it doesn't seem to work.
  12. I want to remove apostrophes from my text, but if...

    I want to remove apostrophes from my text, but if I use the following statement it thinks there are too many as they are the initialiser for the query. How would I get round this? I was wondering...
  13. thanks, I realised I only needed to transfer them...

    thanks, I realised I only needed to transfer them back to print out so I have just incorporated the printf statements into the search function.

    Just wondering is it possible to condense the printf...
  14. duh of course I get a pointer error as it is the...

    duh of course I get a pointer error as it is the start of the list, anyway it now seems to work although b should be the number of times a word occurs in the list and it doesn't always seem to be.
    ...
  15. right i've done that now and it has solved the...

    right i've done that now and it has solved the problem, which gives me another one.

    The pointer stored in root->next is the memory address of the next word which I know is correct, although it...
  16. i've changed that now but I still get the same...

    i've changed that now but I still get the same problem, it has me baffled as the root->next node points to the correct memory address but it seg faults.
  17. so this would be solved be inserting the calloc...

    so this would be solved be inserting the calloc statement before the function is called rather than in the function?
  18. I was messing about with the search function to...

    I was messing about with the search function to see if there was anything wrong in it, and I found that the root->next is connected together correctly.

    I used the following code to test whether...
  19. how would I solve this problem? because the way I...

    how would I solve this problem? because the way I have stored it isn't the last thing stored using the insertlist function the head of the list. As all the pieces of data are linked to the one added...
  20. when I debug it, it seg faults when it tries to...

    when I debug it, it seg faults when it tries to re-call itself as the root->next address is invalid.

    although I have changed the return now so it returns a instead of 0 but I have the same...
  21. well a is incremented in the program which then...

    well a is incremented in the program which then calls itself, so it shouldn't be 0 when the search gets to &, and the program would not compile without the return 0

    also is it possible to return...
  22. ok, im quite a bit furthur with this project but...

    ok, im quite a bit furthur with this project but I have another problem *surprise*.

    I have got my program to read the list in now, but I am trying to search it and it seems to start the list at...
  23. Thanks, I have it working now. I just have a...

    Thanks, I have it working now. I just have a question about freeing the calloced memory.

    Because I need to use this in the main program for furthur operations, how do I go about freeing it. Can I...
  24. Is it possible to pass pointers between...

    Is it possible to pass pointers between functions?

    the readdata function has been fixed so it works properly now but I can't seem to get it to pass a pointer back to the main function, I have...
  25. [Code] ifp = fopen(name, "r"); [\code] is...

    [Code]
    ifp = fopen(name, "r");
    [\code]

    is this line in the program before correct?

    I seem to be getting a segmentation fault as a result of this line not working correctly, it is supposed to...
Results 1 to 25 of 60
Page 1 of 3 1 2 3