Hmm. I can't really make much sense of that FAQ. It seemed like atoi and strtol work when there is a number first, not characters first.
also, when you say:
First, you skip everything until you...
Type: Posts; User: Evandb
Hmm. I can't really make much sense of that FAQ. It seemed like atoi and strtol work when there is a number first, not characters first.
also, when you say:
First, you skip everything until you...
The files is organized as quzah said, but the ( blah blah ) sections always have - between the type and the number, like this
(
int-30
float-402
arbitrary-12313
fooinary-34
barlean-0...
Ok, so I have a file that lists information that I want to store in a struct. It is organized like this:
[
Label
Data
Designation
(these three blank lines are purposely there)
]
Hi all, I wrote this function for a hangman game I am making. This function is supposed to take in prompt for a letter as a guess then check it against two arrays, one wrongly guessed letters and one...
Basically all I need is to figure out how many lines I need to input.
Once I get that, I know how far down I need to go.
Going through the whole file isnt a problem, they are going to be small. I cant really change the format of the inputted files though. Any ideas on how to get the integers?
Evan
Well, I dont know what a linked list is.....
and the second option seems viable I guess. Supposedly you can use fscanf to easily get the number of cds, however. Could I find the number of integers...
OK, I am creating a program that will load a text file of CDs into a prgram and add them to a structure. The text file will look like this:
(Each block of three is 1 CD)
Rating1
Title1
Artist1...
Yeah, I am an idiot. I forgot to add binary=floor(binary/10); to the loop so it would test the next digit. Thanks for your response :)
Hello,
I am trying to get my program to loop through an integer which will have 1-10 digits and check to make sure they all are 1's and 0's. At the moment, my code doesnt work. It gives me an answer...
Ok, so I am trying to create a program that takes as an input a binary number, 1-10 digits. My program will take this input, which will have no spaces between the 1's and 0's and return a decimal...