Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 52 results for
fscan
- Page 1
Anyone know how to do an ipo for the employee management system?
Programming
3 Years Ago
by Vinc_1
…quot;; cout<<"\n========================================================"; //while ((
fscan
(file, "%[^\n]",line))!= EOF) %s//…quot;; cout<<"\n========================================================"; //while ((
fscan
(file, "%[^\n]",line))!= EOF) %s…
Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by javaking33
…static void main(String [] args) { Scanner inScan; Scanner
fScan
= null; inScan = new Scanner (System.in); String …fName = inScan.nextLine(); try {
fScan
= new Scanner (new File(fName)); while (
fScan
.hasNextLine()) { nextItem =
fScan
.nextLine(); nextInt = Integer.parseInt(…
Java hang man, help please.
Programming
Software Development
15 Years Ago
by skelator
… = keyScan.next(); File inFile = new File(fName); Scanner
fScan
= new Scanner(inFile); theWords.loadWords(
fScan
); // creates current word object String current; current…
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by skelator
… = keyScan.next(); File inFile = new File(fName); Scanner
fScan
= new Scanner(inFile); theWords.loadWords(
fScan
); // creates current word object String current; current…
home work help funcations and arry issues
Programming
Software Development
18 Years Ago
by mitchelltab
… ("Status and Grades read from file:\n"); while (
fscan
(fin, "%c", &status) != EOF){//READ ONE STATUS…
Making a letter counting program
Programming
Software Development
17 Years Ago
by FEARmike21
… me to count in my text?: "); c = getchar(); fin =
fscan
(argv[1], c) = h; printf("The letter inputed: %c…
Writing to 2d array with fscan
Programming
3 Years Ago
by tethered_cable
I’m trying to scan in a txt file with a string of numbers. t.txt 123 223 323 <#include stdlib.c> <#include stdio.c> <#include string.h> int main{ char grid[3][3]; int i = 0; File *f = fopen(“t.txt”, “r”) while (i != 3){ for (int j = 0; j < 3; j++){ fscanf(f, “%…
Re: Writing to 2d array with fscan
Programming
3 Years Ago
by rproffitt
Line 6 is incorrect so I didn't make it past that. Compare this to other working code.
Re: Fibonacci Sequence
Programming
Software Development
12 Years Ago
by sinatra87
… the primary problem myself with a little research on proper
fscan
implementation. On line 9 of my original code, I tried… I "fixed" it the first few times), but
fscan
only likes to deal with pointers. The simple fix for… to add a '&', as if dereferencing a pointer, and
fscan
is happy enough with this that it leaves me alone…
Re: Text file I/o help please!
Programming
Software Development
16 Years Ago
by BunnysMom
…. the warning looks like this. -------------------------------------------------- Debug assertion failed program:... file:
fscan
.c line:52 expression: (stream != NULL) --------------------------------------------------- here is the first…
Re: Reading a number and info from a file!
Programming
Software Development
15 Years Ago
by Mz3g
…; x1 << "\n"; [/CODE] Am I using
fscan
file in a wrong way? bcoz I got an error…
Re: hash_map throws a run time exception
Programming
Software Development
14 Years Ago
by mrnutty
… memory exception? Also, do not use code life fgets and
fscan
. Use proper C++ objects like cin or some iostream object…
Re: text file to c++ array - skip comments then read matrix
Programming
Software Development
13 Years Ago
by jimbo_cambridge
… the non-commented lines. The problem is that the following
fscan
lines do not seem to pass the text values to…
Re: Counting word from a file
Programming
Software Development
10 Years Ago
by uonsin
… commented code? Here is an example of how to use
fscan
() http://www.tutorialspoint.com/c_standard_library/c_function_fscanf.htm For what I…
Re: Fscanf seg fault
Programming
3 Years Ago
by rproffitt
Your code is incomplete so I can't see the whole picture. But there is a tutorial to show
fscan
's use at https://www.tutorialspoint.com/c_standard_library/c_function_fscanf.htm
Re: Anyone know how to do an ipo for the employee management system?
Programming
3 Years Ago
by rproffitt
Here, "ipo" is Initial Public Offering. I can't find any mention of ipo in your code so you need to clarify what IPO is or change the question.
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by jon.kiparsky
You can't store a String as an int, unless it can be parsed to an int. You can expressly cast a double to an int, but you'll lose the fractional part. Furthermore, declaring an array to have five members means you can only store five values in it - there's a lot more than five values in your input file. So what is it that you're trying to do? …
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by javaking33
i have to resize the array a few times.. but i am so confused on how this is the output: bogus is not an integer -- ignored weasel is not an integer -- ignored Resizing array from 5 to 10 3.5 is not an integer -- ignored Resizing array from 10 to 20 Here are your 13 items: 100 200 300 150 400 600 250 800 50 500 450 600 550
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by jon.kiparsky
Okay, so you're ignoring non-int values and putting the ints into an array. Fair enough. Now I can look at your code and hope to get something from it. First thing I'd suggest would be that you sub out adding to the array to a method. It's a perfect candidate for making the code more modular: it's an operation that has some logic to it (do I need…
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by notuserfriendly
Do you have to use an array? Is that a requirement? It would be easier to use a vector.
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by Eric Cute
[CODE][/CODE]notuserfirendly's suggestion of using vector is very good. Vectors will handle the resizing of your array because vectors are dynamic. To create a vector, [CODE] vectorName = new Vector(5, 3);[/CODE] then to convert that vector into an array, [CODE] arrayName = new String[vectorName.size()]; vectorName.copyInto(…
Re: Frustrated! trying to insert string into int array...please help
Programming
Software Development
14 Years Ago
by jon.kiparsky
Unless, of course, the array is part of the assigment.
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by BestJewSinceJC
Let me get this straight before I dive into trying to help you. So you are displaying the String as "_ _ _ _" initially, where every second character is a space? Then once the user guesses a correct letter, you replace the String with it? (So like "_ _ A _" after they correctly guess A)? If you aren't doing it like that then how…
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by skelator
I display the string as underscores. Almost exactly as you have. Instead of it being "_ _ _ _" there would be no space between letters "____". When A was guessed it would show "__A_". <----- this is what I do not understand how to do. Also what do you mean by saving the string that you display to the user. As in …
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by BestJewSinceJC
To make it easier on yourself, you should have two Strings. One String should contain the correct word. The other String should contain what you are displaying to the user. If you do this, when the user guesses a letter, you can say [CODE]if (string.contains("A"){ // In here use the String class's replaceAll(oldChar, newChar) method. }…
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by BestJewSinceJC
[CODE]while(wordQuit == 2);[/CODE] What is that for? ^ And what is your correctGuesses variable for? You never used it. And the reason you got InputMismatchException is because your scanner tried to read in one type of (String, int, double, etc) but your input did not have that type immediately in it. See [URL="http://www.cs.utexas.edu/users…
Re: Java hang man, help please.
Programming
Software Development
15 Years Ago
by skelator
The reason wordQuit and correctGuesses are there are for the last bit that needs to be done. I plan on using wordQuit for when the users presses 0, or 1. 0 meaning the give up on the word and 1 meaning they quit the program completely. so while wordQuit = 2 the loop will continue. I don't know if I am actually doing that correctly or not. …
Re: home work help funcations and arry issues
Programming
Software Development
18 Years Ago
by Lerner
Start with restatement of instructions, like this: [code] //I need to use these header files to do what I want //the following values are defined as constants //At minimum I need to use these functions: Read one student’s classification Compute one tuition Compute the low/high/average tuition paid Write one result to the file Display…
Re: home work help funcations and arry issues
Programming
Software Development
18 Years Ago
by mitchelltab
Thanks I will try to work it that way. can you explain how the funcations work. I'm still thinking that they are like pascal. Where when i write the fruncation then the job goes and pulls that funcations runs it then moves on the the next funcation.
Re: home work help funcations and arry issues
Programming
Software Development
18 Years Ago
by Lerner
The function prototype tells the compiler that there will be a function of a given name using a given number and type of parameters that will be presented in a given order and that the function will return a given type. The definition, which can be placed before main() is declared, if you wish, instead of the prototype, will include all of that …
1
2
Next
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC