Hey guys,
I'm really used to programming in Java, but I'm currently taking a C class and my teacher isn't the best... I have a problem and I just can't figure it out. I'm not asking for direct code, just a bump in the right way...
I have to make a program that receives a text file, reads it and counts the specific amount of integers are in that line. Eventually I will have a count of how many 0's, 1's, 2's ... 9's are in the text file and I will just have to output that.
I plan on using three functions, main, a getLine function and a countNums function.
I'm using the getLine function out of The C Programming Language by Brian W. Kerninghan and Dennis M. Rtichie.
The getLine functions takes a char[] and a int as a parameter. is stores the line read in the char[] and the int is the limit of the char[].
I have no clue how to start the countNums function... Or even what to do in it.
Chears
I'm really used to programming in Java, but I'm currently taking a C class and my teacher isn't the best... I have a problem and I just can't figure it out. I'm not asking for direct code, just a bump in the right way...
I have to make a program that receives a text file, reads it and counts the specific amount of integers are in that line. Eventually I will have a count of how many 0's, 1's, 2's ... 9's are in the text file and I will just have to output that.
I plan on using three functions, main, a getLine function and a countNums function.
I'm using the getLine function out of The C Programming Language by Brian W. Kerninghan and Dennis M. Rtichie.
The getLine functions takes a char[] and a int as a parameter. is stores the line read in the char[] and the int is the limit of the char[].
I have no clue how to start the countNums function... Or even what to do in it.
Chears








