Search:

Type: Posts; User: Creedy

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    3,585

    Wouldn't it scan the whole thing into just a[0]?...

    Wouldn't it scan the whole thing into just a[0]?
    I'm not sure whether or not it will keep track of the spaces compared to which slot of the array it needs to be stored in.
  2. Replies
    6
    Views
    3,585

    Scan a line of integers but skip spaces

    Hey, I'm having trouble with my program. The user is going to input a chain of ints and I need to scan these into an array. But the problem is I need to whenever there is a space I need it to scan...
  3. Replies
    2
    Views
    893

    Arrays with structs?

    I have A[ROW][COL] which holds a value of either true or false, so 1 or 0, how would I also be able to hold another value next to this that can vary? How would I do this with structs?

    so if...
  4. Replies
    5
    Views
    1,499

    Oh okay, do you know how I would go through...

    Oh okay, do you know how I would go through adding all the info from the txt file to a two dimensional array? because I have the data in 24 rows and 80 columns.
  5. Replies
    5
    Views
    1,499

    I know how to work with argv and argc but I guess...

    I know how to work with argv and argc but I guess what I'm asking is how to read in the .txt file. So I can hold it in argv[row][col].
  6. Replies
    5
    Views
    1,499

    Read infile .txt with argv?

    Hello, I need to be able to read in a .txt file using infile, while also using argv to get the file.
    I am not sure how to do this. But the input file is going to be in a row x col type so I know I...
  7. Replies
    7
    Views
    2,268

    Okay I will... It was my teacher's doing this...

    Okay I will... It was my teacher's doing this time, he gave us that.
  8. Replies
    7
    Views
    2,268

    Well the code for the functions was not given to...

    Well the code for the functions was not given to me because it is an assignment.
    But grumpy you were right... all I had to do was "b=", it makes sense now.
    Thank you.
  9. Replies
    7
    Views
    2,268

    Help with typedef struct name *name

    So I have a header file and a library with functions and in the header it declares
    typedef struct board *board;

    Now I have to use the functions from the header:
    board create_board(int rows,...
  10. I fixed the argv null issue. Also I fixed the j...

    I fixed the argv null issue.
    Also I fixed the j greater than equal to lenkey.
    It still doesn't work and Im not sure what you mean about where you edited.
    because j is increasing.
  11. okay so this is what i've got it's not working...

    okay so this is what i've got it's not working for me. any help would be appreciated. Thanks


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

    int
    main (int argc, char *argv[]){...
  12. I tried to do this but it did not work... i'm...

    I tried to do this but it did not work... i'm getting weird chars that are unknow symbols?
  13. Adding a string with another string to get the output of the letters added?

    Hello, i was wondering how i would add the char of a string to the char of another string... so i can print out each of these. It is for a cypher so it would look like this...
    HELLO
    +ABABA
    =I...
  14. Replies
    14
    Views
    1,302

    Okay cool. Thanks everyone.

    Okay cool. Thanks everyone.
  15. Replies
    14
    Views
    1,302

    when i try to print it i get an error: format...

    when i try to print it i get an error:
    format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
  16. Replies
    14
    Views
    1,302

    Dangit. One more issue. If i want the first...

    Dangit. One more issue. If i want the first letter of the key then i would printf argv[ i ][ 0 ] ?
  17. Replies
    14
    Views
    1,302

    Thank you vivekraj, Adak, and Alexander jack. I...

    Thank you vivekraj, Adak, and Alexander jack. I understand it better now, it all just came together. I think i should be able to finish the program now. Thanks.
  18. Replies
    14
    Views
    1,302

    i need to be able to save both the strings to use...

    i need to be able to save both the strings to use them in a cypher. But i also must run the program as
    $ a.out key <---The key used for the cypher
  19. Replies
    14
    Views
    1,302

    Scaning chars while initializing program?

    Hello. I was wondering if anyone knew how to scan in a string if you place it right after how to initiate the program.
    i.e. a.out ContentsOfString

    and also if anyone could help out... i...
  20. Replies
    11
    Views
    2,056

    Yeah there are specific guidelines i have to...

    Yeah there are specific guidelines i have to follow for class that are the player continues to play until they have <$2 or out by betting $0
  21. Replies
    11
    Views
    2,056

    yes its in a loop here is what ive got.... i just...

    yes its in a loop here is what ive got.... i just need to figure out a way to where chips=100 isnt valid after the first time through the loop.

    insert

    #include<stdio.h>
    #include<stdlib.h>...
  22. Replies
    11
    Views
    2,056

    I understand all that. What I need is a way that,...

    I understand all that. What I need is a way that, once the loop finishes it sets the chips back to 100 so is there a way to only have it set to 100 for the first time around? and thank you for the...
  23. Replies
    11
    Views
    2,056

    Declare varialbe only once?

    Hello, I am in a begging programing class and I am having trouble with my program. It is a craps game. I have to give the player $100 to start with and then they lose money as they go. The issue i...
Results 1 to 23 of 23