Search:

Type: Posts; User: ominub

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,707

    sorting a string with an integer

    im trying to store an integer with a string. The string has an associated integer used to reference the string. the integers and strings are read in from a file and are in random order. then they...
  2. Replies
    9
    Views
    9,462

    i've gotten this far, but i cant figure out how...

    i've gotten this far, but i cant figure out how to store the smallest number while i compare it to the rest of the results.
    the whole point is printing the rwo closest numbers so it will also have...
  3. Replies
    9
    Views
    9,462

    would anyone mind explaining how to do it?

    would anyone mind explaining how to do it?
  4. Replies
    9
    Views
    9,462

    yes, i realize that...

    yes, i realize that...
  5. Replies
    9
    Views
    9,462

    finding the two closest numbers in an array

    i have a sorted array of integers and i'm trying to find the two closest numbers. anyone have an idea of how to do this?
  6. Replies
    2
    Views
    4,390

    recursion? combinations of numbers

    I've been working on this program for almost 3 weeks, but I can not figure out how to do it. Let me know if you can help.

    i have to write a program using recursion to print a list of number...
  7. Replies
    12
    Views
    2,811

    thank you.

    thank you.
  8. Replies
    10
    Views
    3,646

    dont be a dick.

    dont be a dick.
  9. Replies
    12
    Views
    2,811

    dammit! i looked at that line for hours and it...

    dammit! i looked at that line for hours and it never crossed my mind to do that. thank you!!!

    wait what is gcc? im using bloodshed's dev-c++ compiler.
  10. Replies
    12
    Views
    2,811

    hasnt changed much but if i change what i need to...

    hasnt changed much but if i change what i need to it doesent compile




    # include <stdio.h>
    # include <string.h>

    # define MAX_WORDS 20
  11. Replies
    10
    Views
    3,646

    what is it you want to be a 2D array? ...

    what is it you want to be a 2D array?




    using the mod operator only gives random numbers from 0 to the number "RANGE" its math(that i dont care about) that isnt worth knowing why, just that it...
  12. Replies
    8
    Views
    1,972

    possibly try this... while (...

    possibly try this...



    while ( strcmp(password,check)!=0 ) {
    printf ("Wrong password. Try again.\a\n");
    scanf("%s",check);


    when using string compare, if you want to see if the...
  13. Replies
    12
    Views
    2,811

    ok great i changed that. i also printed the...

    ok great i changed that.

    i also printed the result of the 2 fscanf's and a->num_words gives me the location... 8978688... NOT the 14 it should read. how do i get it use the number it reads. i...
  14. Replies
    12
    Views
    2,811

    anyone?

    anyone?
  15. Replies
    12
    Views
    2,811

    thanks, that was it. any idea about the rest?

    thanks, that was it. any idea about the rest?
  16. OK. i think i got it. thank you for the help!

    OK. i think i got it. thank you for the help!
  17. Replies
    12
    Views
    2,811

    Seg faults. structs. pointers.

    I'm having trouble with this program. it reads in a list of words from a text file and allows you to add words, search for words, compare 2 lists and print the list. the first line of the text file...
  18. thanks for the detailed response. it really...

    thanks for the detailed response. it really cleared everything up. its pretty interesting.

    so let me make sure i got it all.

    when you declare a pointer to a structure inside of a structure you...
  19. wow. it seems really complicated. i think ill be...

    wow. it seems really complicated. i think ill be able to figure it out after a little practice. what is the purpose of declaring a pointer like this?


    struct foo {
    int num;
    char ...
  20. i think i understand. i only have 1 more...

    i think i understand.

    i only have 1 more question.

    on the last 3 lines... when func3 prints a.num and a.word it prints "myotherword" then when the function ends and the printf in main prints...
  21. well this code is made to confuse the reader. its...

    well this code is made to confuse the reader. its a practice for my final exam and we are supposed to trace it and print its output. it serves absolutely no purpose other than that. also line 55...
  22. incrementing character strings? pointers? HELP!

    consider the following code...



    # include <stdio.h>

    struct foo {
    int num;
    char *word;
    struct foo *ptr;
  23. Replies
    6
    Views
    5,137

    well, shucks. thank you o' great one. i didnt ask...

    well, shucks. thank you o' great one. i didnt ask you to write the program. i asked how to generate random numbers.
  24. Replies
    6
    Views
    5,137

    yeah, that didnt really help. i've looked at the...

    yeah, that didnt really help. i've looked at the FAQ's but i cant find anything on how to generate random #s between two numbers
  25. Replies
    6
    Views
    5,137

    Generating random letters

    im writing a program for practice that writes 1000 random words to an output file. the random words dont have to actual words just a bunch of lower case letters strung together in random lengths of 3...
Results 1 to 25 of 67
Page 1 of 3 1 2 3