- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 40
- Posts with Upvotes
- 32
- Upvoting Members
- 29
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
20+ years experience in C, C++, VB. Helped create AutoIt3. Learning VB.Net, C#, Java
- PC Specs
- Multiple
183 Posted Topics
Re: I am eating nothing right now. I do not like having to clean the crumbs out of my keyboard, so I don't eat around my computers. | |
Re: There is a syntax error and a logic error I can see in this. First, a variable name is always 1 word, with no spaces in it. You could use an underscore (_), but it is generally not needed. Also you should make your variable names descriptive of their use. … | |
Re: The first episode of Doctor Who (November 23, 1963) aired the day after President Kennedy was shot (November 22, 1963). | |
Re: Adding 4 numbers and multiplying 4 numbers makes sense: `A+B+C+D`, `A*B*C*D`, but subtraction and exponents can only operated on 2 numbers at a time. Factorial can only operate on 1 number as a time. I think you need to define your problem a little better to get a clearer vision … | |
Re: The error is really on line 18, but it is reported on line 17. The **switch** statement must be followed by **case** clauses, each with a constant value for comparison. Line 18 is not a **case** clause, so the compiler reports that the **switch** statement is malformed. Also, individual cases … | |
Re: fflush() on an input thread is not actually defined in the C standard, thus its behaviour is compiler-dependant. It would be nice if it cleared an input buffer, but for most compilers, it does nothing. It won't fail, but it does not clear the buffer either. The behaviour of fflush() … | |
Re: In your original functions, I would pass the std::vectors by reference, not by value. If a value is not expected to change, apply a *const* modifier to the argument. Now the compiler will warn you if you try to change it. Do not use the same name for your data … | |
Re: Unix is like sex. Until you have had it, you are not sure what all the fuss is about. After you have had it, you wonder how you ever lived without it. Edit: I think I have used this somewhere before. Oh, yeah, my signature. | |
Re: According to your specifications: Item 1: `=IF(OR(U20=W12,U20=W13),1,0)` This will set the current value to 1 if U20 equals W12 or W13. Otherwise it gives 0. Item 2: More detail is needed to help with that. What status values apply for what dates? Is a specific day, day of the week, … | |
Re: How are the values for TextBox1 and TextBox3 getting into the textboxes? I would like to see more explanitory names, describing how you are using these controls. TextBox3 seems to be user type, but what is TextBox1? Are you sure that those are the **exact** text appearing in TextBox3? Put … | |
Re: Break Mode usually occurs when you have stopped your program with the Pause button in the IDE or hitting a breakpoint. You can also put a `Stop` keyword in your code to get to Break Mode. What were you trying to do when you got the message that you were … | |
Re: There were several problems with your code. I had to make some significant changes just to get it to compile. 1. I added `#include` lines at the top to read in the required function declarations. 2. You had two different names for your file handle. `Student_Info` was a better name … | |
Re: Take a look at the Listview.ItemChecked event. In that event handler, Add the item to a List<ListViewItem> defined at the level of the form. If the ListViewItem gets unchecked, Remove it from the list. When it is time to output, go through the list and output the Text in order. | |
Re: I am assuming that `command A` actually tells the program how to manipulate the two numbers, so you can check each command in a `switch` statement then if the command given is not recognised, have a `default:` clause to report "Unknown command". Read each line into a buffer, making sure … | |
Re: You should also consider if the user enters a capital letter as well. The `toupper` and `tolower` functions in <cctype> can be useful for this. | |
Re: A union with bit-fields would provide you most of the functionality, but you can not address the bit-fields using array notation. You may want to create a function which returns the applicable bit(s) by bit-shifts and &. c=0x65; printf("%u\n", bitfield(c, 3)) /* display bit 3 of c. */ | |
Re: When you are providing extra information for an existing question, it is better to reply to your original question, rather than creating a new question. | |
Re: There is some critical information missing in your question: 1) You are supposed to display the information from a object. What information from the object are you supposed to display? In what way are you supposed to display it? 2) Where is your effort to answer the question already? What … | |
Re: Did you intend that `class a` has no data and only 1 invariant method? Is that even valid? | |
Re: Why is everything commented? When you declare `sql_empid`, you assign a value from another control, `cmbaaa`. Did you want to assign from `Combo1` instead? After opening the connection, you reassign `sql_empid` with a totally different string, referencing the initialized value. This is not generally considered good form; use seperate variables … | |
Re: If you are wanting to see how long somebody was logged into your applications, record the log-in time in a variable that will survive the life of your application (in a module or main form) and when the user logs out, use DateDiff to determine the time that the user … | |
Re: There are various ones for each language and some or any langauge. You could check out: [The Obfuscated C-Code Contest](http://www.ioccc.org/) for an example of a C programming contest. If you are into creating small games, there is the [Java 4K Game Programming Contest](http://java4k.com/). A quick look with most search engines … | |
Re: In your third loop, you are assigning each element of `arr3` with the sum of the last values of `array1` and `array2`, which would be 1065. To get the array reversed, you need to reference an array subtracting the index from the end. e.g. printf("The reversed array is: "); for … | |
Re: I am assuming you are working in Windows, as GetLogicalDriveStringsW and GetDiskFreeSpaceExW appear to be Windows functions. What specifically is going wrong? Are you getting compiler warnings and/or errors? If so, which compiler? If the program runs, what behaviour are you getting that you are not expecting or what behaviour … | |
Re: More context is necessary before answing the question. 1) What are specification for the assignment? 2) Please post the code you already have for the profit/loss page. 3) Based on this, we may be able to give you some advise, but we will not do your homework for you. | |
Re: How are these functions being called? Where and how are `rank` and `atype` defined? I need more context to answer this question. | |
Re: What you need is a *nested loop*. For each element in `standard`, go through `sample`, looking for matching elements. If you find one, assign 'y' and quit the inner loop. If you get through the sample loop without finding anything, set the standard value. Do you really want to overwrite … | |
Re: What is the intent of this program? What specific error are you getting? What are you doing when the error appears? Is it a compile error or a run-time error? Which **if** statements generate this error; you have more than 2. Please enclose code samples in a code block. On … | |
Re: First of all, your two tables are identical. I think LIKES is defined slightly differenetly, based on your other comments about it. When the database engine is comparing your tables, if matches each record in one table with each record in the other. If all the conditions are met, then … | |
Re: - What were you thinking? *Were* you thinking? Well, there's the problem. - I think I see the problem your code. **You!** - Is there actually a question with this code or are did just want to post a code snippet? (Subject was "Help me") I must admit to using … | |
Re: `DISTINCT` is doing its job properly. Distinct looks at all fields and eliminates ones that are completely duplicated. In your set, for example, field 1 equals 0001 in three records. Most of the fields are the same, but the last two fields are different, so `DISTINCT` considers them different records. … | |
Re: The kernel is the core of the operating system. In Linux and other Unix and Unix-like operating systems, it is the program that manages all the resources of the computer. In other words, it is the part of the operating system that everything else relys on. It manages all the … | |
Re: Is there a question to this, or are you wanting to just post a code snippet? As I read it, your code to actually do the swap will not work. You will need to assign to both `a` and `b` to perform a swap, but you just assign to `a` … | |
Re: I see that you included the data validation I recommended last time. Good. The editor you used to create the file does not appear to be the problem because your data file looks reasonable for the situation. Why are you reading the string starting at the second character with `sscanf(&str[1], … | |
Re: Here are some ideas that I like to use when teaching programming. 1. Create a program that prints out the number distinct 5-card hards in poker, starting with Royal Flush going down to High Card. Output should include the number of distinct hands and the percentage of the total of … | |
Re: We do not write your code for you; you have to do that. What this forum is for is to help you when you get stuck. Post the code you have pointing out where it stopped behaving properly and we will give you some advice. There are lots of examples … | |
![]() | Re: Guessing the middle of the range to make things faster. Using a random number in the range just adds extra complexity and extra guesses. Is your number 50? L Is your number 25? H Is your number 37? L Is your number 31? L Is your number 34? Y |
Re: What type of computer do you have? Laptop or desktop or something else? If the LED turns on and stays on, then it may be a power indicator or the hard drive activity indicator and these are normal. If they flash while booting (but not really quickly; that is just … | |
Re: Another thing `const` does is allow the compiler to perform some extra optimizations, which means that the program can potentially run faster and use less memory. But yeah, as the others have said, using const everywhere makes you think when the compiler complains, "Do I really need to change this … | |
Re: Look at the Sheets collection to find the Sheet object for the page. `Worksheets("Expenses").Range("D2").Value = ActiveSheet.Range("C21").Value` This is untested, so might need some tweaking. | |
Re: Is there a question to this posting? If not, it should be put in Code Snippets. | |
Re: It all depends on what you are trying to do. So what are you trying to get done that OpenCV should help you with? Are you having a specific problem doing something using the OpenCV library? | |
Re: Given a series of points and costs to move between points, create a program to determine the lowest cost (and other possible criteria) to move between all points without repetition. Not all points need to connect to all points. This is famous style of problem in computer science optimization. Good … | |
Re: As I understand the specification, each turn a player is supposed to add a letter either to the beginning or to the end of the previous word. You are not checking to see if this is a valid English word, but if the players made valid moves. Did a player … | |
Re: There are some issues with `fscanf()` regarding how it handles bad data if you aren't using it carefully enough. `fscanf()` returns the number of fields it was able to read and assign to variables. It is important to always check this return value and make sure it is what you … | |
Re: In the comments, you state on line 8 that the brick sizes are in millimeters. Because you are multiplying by 1000, it looks like the wall lengths are in metres, but that should be in comments somewhere. I would recommend that if you need to consider other units of measure, … | |
Re: Visual Basic has two types of decision structures: If-Then and Select Case. If-Then is used when you have a general condition or multiple conditions to test to determine if code should be executed. The Select statement is for comparing a variable or calculation against a series of values, without recalculating … | |
Re: If you do not unregister your hotkey before shutting down your program, you can cause a Big Blue Screen of Death. I did that a few times when I started working with HotKeys years ago. | |
Re: Another way of handling this is with a Select block: Select Case MsgBox("Are you sure you want to Logout?", vbYesNo, "Confirmation") Case vbYes frmAuthenticaion.Show Unload Me Case vbNo Exit Sub End Select Using a Select block gives you more flexibility for when you are using an option that gives more … | |
Re: What sort of things have you already done? What steps do you take to do this manually, if you are doing it already? What software are you using already to generate the ticket? |
The End.