- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 60
- Posts with Upvotes
- 57
- Upvoting Members
- 33
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
Re: This program appears to be a merge of the 'have the computer pick a word and have the user guess it' and your 'number guessing' program. As written, the user doesn't have any interface to ask if the word contains a letter. You let them guess at the word and … | |
Re: I agree with grumpier, if you have to use the system() call, you're stuck with the "black window". But unless you're calling batch files, you can probably avoid the system() call. | |
Re: I like using random.shuffle() on the unused cards (or deck) and then you can just pop() a random card off the unused list. If you need to keep a used cards list, you can append the card you just got. When it is time to shuffle again, you can refill … | |
Re: And why are you posting in a thread last posted to in October 2007? | |
Re: This is the essential parts of the 'source' for the basic search form extracted from the web page you indicated: [code=html] <form action="/search.php#results" method="post"> <strong>Basic Search </strong> <strong>First Name:</strong><br> <input name="fFIRSTNAME" type="text" size="10" maxlength="25" value=""> <strong>Last Name:</strong><br> <input name="fLASTNAME" type="text" size="10" maxlength="25" value=""> </form> [/code] The <form> tells you that … | |
Re: So what are the 'given' parameters for the tree? Are all values in the tree guaranteed to be single digits? Is there a maximum depth limit? Ok, let me work this out 'on paper' so I understand it: {Note that spaces are preserved inside code tags.} Tree with 3 nodes, … | |
Re: attrib is a program, not an internal command. Either, the program has been removed or renamed or it is not in your path. Though it sounds like you have a more serious problem with the system. The BOOT.INI file is what Windows uses to determine where to find the windows … | |
Re: I agree with Comatose, you should probably put the part that prompts for and accepts new input inside the loop somehow. That way as the loop is run again you ask for input again. The psuedo-code looks something like: [LIST] [*]While the user has not guessed the number [*]Prompt for … | |
Re: Putting code in headers is generally bad form....if you include that same header in more than one file in a compilation unit you get duplicate symbols. The original layout of the files should have worked, did you include myfile.obj or myfile.o when you compiled main.c? | |
Re: Well, I personally prefer to help with code that will at least compile... Your original lines 36-39: [code=c] status = fscanf(filep, "%d%d%d%d", measuredp->site_id_num measuredp->wind_speed measuredp->day_of_month measuredp->temperature; [/code] are missing the closing ')' for the function call and the ',' separating the arguments. What dragon was referring to was that with … | |
Re: I'm thinking that your problem is actually the format character in the last printf. '%d' is for decimals/integers. Try using a '%f' instead. | |
Re: I googled the function name and came up with this description: [quote] The function cvCalcOpticalFlowBM calculates optical flow for overlapped blocks blockSize.width×blockSize.height pixels each, thus the velocity fields are smaller than the original images. For every block in imgA the functions tries to find a similar block in imgB in … | |
Re: What part have you written and/or what specific question do you have? - Did you get the binary file open? - Did you fill the vector from the file? - Did you find the start point of the string? - Were you able to append characters to your string from … | |
Re: I'd like to experiment with the code to try it, but in the interest of a quick answer, try [icode]low < mid[/icode] on line 20 and [icode]mid < high[/icode] on line 25. Basic translation: If there are values between low and high that are lower than mid, add them to … | |
Re: You're going to have to save the operands that you show the quiz taker so that you can actually perform the math to see if they give you the right answer. Right now, in CheckAnswer, you re-generate two operands and add them together. If the user happens to have entered … | |
Re: I found this code example [code=Perl] use Getopt::Long; my $data = "file.dat"; my $length = 24; my $verbose; $result = GetOptions ("length=i" => \$length, # numeric "file=s" => \$data, # string "verbose" => \$verbose); # flag [/code] at [url]http://perldoc.perl.org/Getopt/Long.html[/url] (The first page returned for google "perl getopt long") If you've … | |
Re: It was my understanding (and I did a little searching that didn't disagree) packets sent to 239.255.255.255 should be available to anyone with a 239.x.x.x address. Does your computer have a 239.x.x.x address? Are you listening to the right port? | |
Re: So you don't want to append to the file, you want to update its contents? How many files are there? One per team? One per player? One per stat? If the file is in ASCII form (like your sample stat was) and you need to update it, you will likely … | |
Re: Think about it...how would YOU do it? All you really have to do is additional testing in the year they would turn 18. If they would turn 17 (or younger) this year they fail. If they would turn 19 (or older) this year they pass (they're already 18). If they … | |
Re: If you were given the assignment to do it by hand, how would YOU do it? (The manual process makes a good basis for the pseudo code for the computer.) | |
Re: did you mean to save the key and value pairs you read in so you can search them when you open the second file? | |
Re: I'm not sure what the question is. You declare a pointer to an object of the appropriate type on line 17, in most linked lists I've seen, it is usually named "next" but other than that I don't see a problem. You do appear to be declaring one on line … | |
| Re: You want to put the date and time in the title of the window that pops up, or do you want the name of the directory to contain the date and/or time? For getting the date/time into a string, you might look at strftime() and you should probably also consider … |
Re: It was a link to another thread that explains why not to use eof() in your while loop condition. Click the link, read the thread and implement the change. | |
Re: line 24 is passing the address of a function to scanf? I think you meant [icode]scanf("%f", &inch);[/icode] line 35 you need to pass the address of restart [icode]scanf("%f", &restart);[/icode] | |
Re: I wouldn't have written it in the same way, but I think your problem is two-fold: First, you never set an initial value for [ICODE]DivSales::totalSales[/ICODE] so it's initial value is undefined. Second, line 21 of DivSales.h where you think you are adding to the total, [code] totalSales =+ q0+q1+q2+q3; // … | |
Re: the [ICODE]ifstream fin[/ICODE] on line 48 inside readin() is NOT the same as the stream of the same name that is declared on line 20 and opened on line 24 in main(). You either need to open the file in readin() or pass the stream from main into readin(). | |
Re: You put your variable definitions in a .py file you could name it definevble.py if you wanted to. Then from the other python file (.py) that wanted the variables you add a line: [code=Python] from definevble import * [/code] That imports everything in that file into this file. I think … | |
Re: I've never actually done it for a website, so you may want to take this with a grain of salt. The concept is that as a user is added to the 'database' of users, you generate a random 'validation value' that is also stored with the user. You then generate … | |
Re: If you don't intend to use any of the predefined C++ data types in your implementation, what do you propose to use? A 6000 byte long number could be implemented, I would probably use an array with 6000 elements, but that still uses base C++ data types. (Ignoring the fact … |