Wow, I didn't even see those things. Thanks for the start.
Actually, those things fixed the whole program. Thanks.
Type: Posts; User: pxleyes
Wow, I didn't even see those things. Thanks for the start.
Actually, those things fixed the whole program. Thanks.
Yea, no matter what I try, I cant get those numbers to go into an array right. Any help one those few lines would be nice.
After looking up the stoi function, I like that a lot. I am trying to implement it, but I am getting a lot of warning. Take a look at what I hope is close to my final version.
#include...
oooo, ok. That makes sense.
I am wondering if that will work when I dont know the number of numbers in the file because the size of the array then depends on the number of numbers, and if you...
Also, what in the world is atoi. I have never encountered that before.
why are you *10. I dont get that part.
See, I know what I have to do in those terms guys, but I am completely lost as to how to do them. I dont know how to get fgetc() to keep reading until \n and put everything it read up until that...
Doesn't work like you would expect it to if you do that though.
The title is misleading in that the numbers in the file are displayed in a column.
Example:
3
5
10
4
8
1
Ah, ok. I just moved the d=fgetc(fr); into the actual while loop. This works fine. Thanks.
I am trying to compare two files through command line arguments. The result is that the program returns the line number at which the files differ based on the first byte that it encounters that...
That makes a lot more sense. Thank Salem. nonpuz, your fix helped too.
I am trying to make a program that copies the contents of any number of files into one big file. No breaks or anything needs to exist in between the contents of the files. I have a good working...
then why when I use stdout it just doesn't let me type when i need to give input?
I have never been taught stdin or stdout statements. I am just saying it works, and I dont have a clue why.
um,. I just changed it to stdin on your function prelude and it started to let me type. I dont know what exactly is going on with stdin, but it works...
Prelude, that wont let me type in anything....
quzah, I had never used std's before, and we were given the stdin statement to use. Stupid TAs....
I know I am talking to myself, but when someone can help me, this will help them.
I changed the function to this for now, although it still doesnt work:
int occurrences(){
int *s,*b,...
I realize I forgot to clarify what the function is doing. The user inputs a second string. the first string is inputed when the program starts. The second string is then used to search through the...
Well, I am at it again. I am making another menu-driven system with a bunch of functions that does things to strings. I am set on the first two options, but I am having trouble with option 3. You...
I would have never gotten that. How does that work? Decrementing n-- in the conditional spot of the for loop.
I made a little progress, but there is still a weird error in the results of strcmp.
Let me show what I have:
[code]
# include <stdio.h>
# include <ctype.h>
# include <stdlib.h>
int...
Well I am still working on that strcmp function, but I have made some progress. I am still a little worried about the incrementing both strings at once so they compare the same character number each...
Ah, ok.
As for the above mentioned strcmp function, would my method I described be adequete, or I was thinking of somehow translating the characters into their binary cousins (if this step is even...
Prelude where would I be without you.
Question. Why do you need the (char) in front of the toupper statement.