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.
Type: Posts; User: Creedy
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.
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...
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...
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.
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].
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...
Okay I will... It was my teacher's doing this time, he gave us that.
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.
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,...
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.
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[]){...
I tried to do this but it did not work... i'm getting weird chars that are unknow symbols?
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...
Okay cool. Thanks everyone.
when i try to print it i get an error:
format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
Dangit. One more issue. If i want the first letter of the key then i would printf argv[ i ][ 0 ] ?
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.
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
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...
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
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>...
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...
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...