Search:

Type: Posts; User: ahming

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,165

    So anyway here's the code. I type 1 and it skips...

    So anyway here's the code. I type 1 and it skips the input for the reverse string. please note this is a friend's code, i don't even do this subject but its always interesting to know why. I did a...
  2. Replies
    3
    Views
    3,165

    User input gets skipped

    Well i don't have code on me, but I sometimes come across a situation in the past where my program skips the user input, such as a gets line or an fgets line. I'm wondering why it skips this?
    is...
  3. Replies
    7
    Views
    2,836

    declaring a structure in another headerfile

    do i just declare as normal?



    http://img100.imageshack.us/img100/9362/ipheaderki6.jpg
  4. Replies
    3
    Views
    3,489

    Switch function problem

    Below is the code for my clock.

    The 2nd switch function doesn't operate properly. After it goes through all the cases from 1-5, it doesn't loop back. I think I've misunderstood the purpose of...
  5. Replies
    5
    Views
    1,392

    so i could have instead of lptr->list[pos]

    so i could have instead of

    lptr->list[pos] < item

    could i have

    pos instead of lptr->list[pos]? seeing as it gives the position.

    well here is the full code:
  6. Replies
    5
    Views
    1,392

    don't quite understand this line...

    currently reading about lists.

    i have this line of code in an insertion function.


    if (lptr->list[pos]>item)

    i have an array containing this for example:

    0: Deer 1:Fox 2: Dog 3:Cat
  7. Replies
    8
    Views
    3,531

    aahhh okok thanks a lot for the help!

    aahhh okok thanks a lot for the help!
  8. Replies
    7
    Views
    8,713

    oohhh i see. so fprintf gives you more control...

    oohhh i see. so fprintf gives you more control over where it is being directed to either stderr or stdout. even though printf uses stdout, i don't see how it'd get stuck in a file, as it always...
  9. Replies
    8
    Views
    3,531

    oh didn't know you could do that.. thought you...

    oh didn't know you could do that.. thought you had to use string functions from the string library. such as strcmp or whatever the one is for comparing strings.
  10. Replies
    7
    Views
    8,713

    printing error using fprintf

    i don't understand the difference between using

    fprintf and printf for error statements.

    e.g.



    void mergeSort(float array[], int size)
    {
  11. Replies
    8
    Views
    3,531

    yeah i understand the ascii how do i put it.....

    yeah i understand the ascii

    how do i put it..
    well lets use 'post' again..
    char letter = 'B' (which equals 66)
    char string[i] (holds post)

    if letter equals 66
    string[0] is p. which 112 on...
  12. Replies
    8
    Views
    3,531

    don't understand that bit.. sorry. but...

    don't understand that bit.. sorry.

    but everything else you said made perfect sense. Since the single quotation marks make the letter A, equal to 65. say in the string it currently holds the word...
  13. Replies
    8
    Views
    2,232

    wow i think this is beyond me. i'm only starting...

    wow i think this is beyond me. i'm only starting to learn this stuff plus exam on it in two weeks sorry if i couldn't help
  14. Replies
    8
    Views
    2,232

    i'm a beginner in this.. but i'll make a...

    i'm a beginner in this.. but i'll make a contribution anyway and see what people say..

    in this line..


    i noticed your missing your typecast?

    e.g.

    main()
  15. Replies
    14
    Views
    5,239

    hey, pointers giving you hell as well?? yeah well...

    hey, pointers giving you hell as well?? yeah well your not the only one around here.

    i myself still don't have a firm grasp of it all. but what i think i do know is that pointers are used because...
  16. Replies
    8
    Views
    3,531

    sorting alphabetically

    oki need to sort a string alphabetically by the method of selection sort.

    here's the piece of code i don't quit understand.



    void sortString(char* s, int size)
    {
    int i, j;
    char...
  17. Replies
    7
    Views
    4,750

    hhmm i'll try..

    hhmm i'll try..
  18. Replies
    7
    Views
    4,750

    could i add borders in an an array for the board?...

    could i add borders in an an array for the board? it'll be a 6x6 board
  19. Replies
    7
    Views
    4,750

    making bejeweled

    this is a project i have to do for uni

    but i'm not sure if i have to use structs?

    i have to create a board with ACSII characters and use 4 jewels as character symbols. i don't see where i have...
  20. Replies
    9
    Views
    1,872

    some slight help..

    i'm trying to print out a triangular form of a set of numbers
    should be printing out like this
    1
    22
    333
    4444
    55555
    666666
    up to 9.
  21. Replies
    6
    Views
    1,431

    been spendint he the past 1 hour trying to...

    been spendint he the past 1 hour trying to implement this code into the above code posted by salem... can't get it to work :(:(


    int isValidInput (double amount, double annualRate, int nmonths)
    ...
  22. Replies
    6
    Views
    1,431

    cool thanks thanks :) i understand now

    cool thanks thanks :) i understand now
  23. Replies
    6
    Views
    1,431

    why didn't you have this in your code?? and you...

    why didn't you have this in your code?? and you above code with the part calling the function inputinfo(blah blah); doesn't work.


    int *amountPtr = NULL; /*initializing pointers*/
    ...
  24. Replies
    6
    Views
    1,431

    help with coding...

    ok what i need help here is with calling the function 'inputinfo' in the 'main()'. what am i doing wrong here..? and also if i try the same method with the rest of the functions will there be errors...
  25. Replies
    1
    Views
    1,714

    pointers and arrays..

    can someone explain to me how pointers and arrays work..
    i'm kinda confused..
Results 1 to 25 of 25