Search:

Type: Posts; User: Kayl669

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    890

    Problem resolved. Resolution: inadequate...

    Problem resolved. Resolution: inadequate specification of constructors.
  2. Replies
    1
    Views
    890

    class my_string woes

    I can't figure out what's wrong with my + function. 'my_string temp' doesn't appear to be assigning a memory address to temp.s or the correct value to temp.len and so the terminates with an error....
  3. Replies
    3
    Views
    900

    Thanks for your help both!

    Thanks for your help both!
  4. Replies
    3
    Views
    900

    String class confusions

    My string array 'wordbank' is empty after my getword function has run. Please could somebody tell me what I need to know about strings to understand why what I'm trying won't work. Thanks


    ...
  5. Replies
    4
    Views
    1,696

    Thanks Salem. This one threw me because the error...

    Thanks Salem. This one threw me because the error appeared immediately after stepping out of strstr. I expected to step through more code before getting this error. Any idea why gdb skips stepping...
  6. Replies
    4
    Views
    1,696

    Help I don't understand my seg error!

    When I run gdb and set my args and step through to identify what is causing the problem I get a segmentation error on line 17 :

    'if (strstr(*argv, "./")) {'

    However, if I comment out from below...
  7. Replies
    2
    Views
    2,635

    I knew it would be something stupid on my part. I...

    I knew it would be something stupid on my part. I just couldn't see it
  8. Replies
    2
    Views
    2,635

    I don't understand this segmentation fault

    I'm getting a segmentation fault on the '*val = atof(*argv);' line but can't understand what's going on. I want this piece of code to put numeric command line arguments in the val array. What's the...
  9. Oh I See! Thanks for your help

    Oh I See! Thanks for your help
  10. It's nice that you're getting the right output...

    It's nice that you're getting the right output Syscal...any ideas why I might not be?

    Thanks for your responses.
  11. My function argument is being altered but why?

    #include <stdio.h>
    #define ARRSIZE 200

    void itoa(signed char, char[]);
    void reverse(char[]);

    int main(void) {

    signed char num = -127;
    char string[ARRSIZE];
  12. Thank you for your help. I got there in the end....

    Thank you for your help. I got there in the end. One of the problems was that I didn't realise that the higher order bits ignored in calculating next wouldn't affect the result of the following...
  13. Thanks for your help both. How is this...

    Thanks for your help both.



    How is this code processed then, such that the function 'next' doesn't exceed its limit? How are upper bits lost and the calculation still successfully made?

    :)
  14. Why does this UL int appear to exceed its limit?

    In the following code I'm not sure how the rand function operates successfully, given that the unsigned long int variable 'next' appears to exceed that variable type's limit of 4294967295 (Thanks for...
  15. Replies
    3
    Views
    1,066

    Need help using gdb!

    Hi,

    I've produced some code (some of which is below) that contains a segmentation error on line 87 ("ascii[d] = '\0';" in my htoi function). I'm creating a function to convert a hexdecimal string...
  16. Replies
    10
    Views
    6,113

    Ok I've got a lot of new stuff to learn here!...

    Ok I've got a lot of new stuff to learn here! Thanks for your help.
  17. Replies
    10
    Views
    6,113

    Thanks laserlight. Although can you give me an...

    Thanks laserlight. Although can you give me an example as I'm not very knowledgeable about in-built functionality. Also I think CHAR_BIT is part of the limits header and my exercise tells me I should...
  18. Replies
    10
    Views
    6,113

    Actually I spose you wouldn't use char variables...

    Actually I spose you wouldn't use char variables in a printf context...that's more putchar()
  19. Replies
    10
    Views
    6,113

    Thanks for your help both. Can I confirm with you...

    Thanks for your help both. Can I confirm with you that in a printf context %d is used for signed ints and %u for unsigned ints... What about unsigned chars too?

    MK, I kinda get Two's complement...
  20. Replies
    10
    Views
    6,113

    Thanks! I got this as an output: Value of 'a'...

    Thanks! I got this as an output:

    Value of 'a' is: -1
    Value of 'b' is: 65535
    Value of 'c' is: 255
    Value of 'd' is: -1.0000000

    from

    #include <stdio.h>
  21. Replies
    10
    Views
    6,113

    Manual calculation of variable type ranges

    Exercise 2-1: Write a program to determine the ranges of char, short, int, and long variables, both signed and unsigned, by printing appropriate values from standard headers and by direct...
  22. Replies
    8
    Views
    3,434

    OK. Thanks all. Very helpful. Dino I've sorted my...

    OK. Thanks all. Very helpful. Dino I've sorted my mistype thanks for pointing it out.
  23. Replies
    4
    Views
    4,868

    Hi again, I'm using the GNU GCC compiler....

    Hi again,

    I'm using the GNU GCC compiler. Everything is as default because I'm very new to all this. Is GDB a compiler?
    Thanks
  24. Replies
    8
    Views
    3,434

    Thanks laserlight; that's resolved the issue! Is...

    Thanks laserlight; that's resolved the issue! Is there someway I can query my <stdio.h> to see what functions it contains?
  25. Replies
    8
    Views
    3,434

    Thanks for your suggestion Epy, although, I've...

    Thanks for your suggestion Epy, although, I've implemented it (see below) and still get the same problem:



    #include <stdio.h>
    # define MAXLINE 1000

    int getline(char[], int);
    void copy(char...
Results 1 to 25 of 31
Page 1 of 2 1 2