1,857 Posted Topics
Re: Thousands and thousands of people know. If you want to learn Google will help. | |
Re: Here's [one place](http://www.codeproject.com/Articles/12347/AVL-Binary-Tree-for-C) to start. | |
Re: It sounds like you're not disposing of the old forms before you create new ones. You'll probably have to show the relevant code to see what is going wrong. | |
Re: The code inside the timer1.tick event handler is going to run every time the set interval is reached. For instance, if the interval is set to 1000 then that code will run every second. You will probably need a signal to enable and disable the timer or a conditional so … | |
| |
Re: Assuming `Article` and `price` are some sort of list control, generally the items are stored as objects. In order to use them you must cast them to the appropriate type. Your choices are simple, either use the ToString method or cast the SelectedValue's to integers(`DirectCast` method will do). The one … | |
Re: Your problem is in the way your trying to do a 2D array. This [article](http://www.cplusplus.com/forum/articles/17108/) should help. | |
Re: Since ComboBox will accept any objects, you can implement a `ToString()` override in your class that represents the styles. Then in the SelectedIndex event cast the SelectedItem to the class object that represents the styles. | |
Re: Another way is to use a regular textbox and handle the Validating event: Private Sub TXT_BillCode_Validating(sender As Object, e As CancelEventArgs) Handles TXT_BillCode.Validating Const codes As String = "PNRpnr" If TXT_BillCode.Text.Length > 1 OrElse TXT_BillCode.Text <> "" OrElse Not codes.Contains(TXT_BillCode.Text) Then MessageBox.Show("Invalid Code", "Please enter only the letters P,N, or … | |
Re: I like VS2015 for their more advanced Intellisense and debugging support. I keep Code::Blocks around to make sure the code is more compliant since VS has some holes in that area. | |
Re: If you have the option, sorting the names as you add them would most likely be a better option. | |
Re: You don't specifically say but I assume the final image is the same size as either of the 2 images being merged. If so, instead of creating a new image, try overwriting the front image instead, that should cut down on the resources that are used: for (int i = … | |
Re: My understanding is that technically any code belongs to the author. Open Source basically means that others are allowed to modify the source code while giving acknowledgement to any previous authors of the code. Until the author gives such permission no one else has the right to copy his/her work. … | |
Re: I would suspect, that if `ID` is a string, that this,`if(current->ID == data_search)`, is trying to compare an int and a string, which are 2 different types. You'll have to change/convert one or the other to the other type. | |
Re: `GetFiles` returns an array. Something like this should work: Dim counter = My.Computer.FileSystem.GetFiles(folderName).Length One thing to keep in mind. If you plan on using the array of filenames later,generally, one would create an array to hold the names and use the length property from it: Dim filenames = My.Computer.FileSystem.GetFiles(folderName) Dim … | |
Re: Another thing `getch()` is outside of main there's one too many closing braces. Also, `chooseNameOrID(&string, &mode);` is passing addresses to a function that doesn't expect them. | |
Re: Since you're brushing up, remember that in order for others to understand your code easier, put the declaration for each variable on a separate line and indent properly. | |
Re: Since nothing in this code actually writes anything to a file, you should show the code that does. | |
Re: Not sure what lesson your instructor is trying to teach here, but this seems like a good opportunity to learn about Object Oriented Programming. * I'd start with a class("Account"). This would have properties for Account Number, Account Type, and Amount. The functions for deposit and withdrawal would be here. … | |
Re: Actually, aside from running the process through `cmd` instead of running it directly, your code produces the right results. I would suspect the problem is either with `cmd` or in the way `executable` is handling the arguments. The first option is easy to check, replace `"cmd.exe"` with `"executable.exe"` and remove … | |
![]() | Re: Since the values are coming from a database, I'm wondering if using `DBNull` would work instead of `null` ![]() |
Re: Your only options appear to be: * Use `long double` * Make your own function | |
![]() | Re: Many developers use logical names for their controls that will allow them to recognize their purpose even after a long time has passed. One thing you should most likely avoid is putting the control type in the name. If you need to change the control but still with the same … ![]() |
Re: First thing I see, the `font` tag doesn't have a closing tag on line 18. I would suspect it should be something like this: <description><font class="tableclass">Functie:</font> <asp:label id="LbLVacatureOmschrijving" runat="server">Vacature Omschrijving</asp:label></description> | |
Re: One way is to use `System.IO.Directory.GetFiles` Dim wantedfiles = System.IO.Directory.GetFiles("C:\Restran Conversion\IPSDATA\PM00213A", "20141210.*")(0) GetFiles actually returns an array but if you know there will only be one, just use index 0 | |
Re: I couldn't reproduce the error, but I did notice a few things: * `void getNextGen(boolMatrix& generation, int liveNeighbors, int row, int col)` accepts 3 arguments(int liveNeighbors, int row, int col) that are never used but are re-declared inside the function * `tallyLiveNeighbors` doesn't return any values instead it modifies an … | |
Re: Just a thought, ID numbers aren't usually edited unless you're creating them. This would lead me to postulate that you're only displaying them. Perhaps a multiline textbox or a listbox to display all the ID numbers in one control would work, or if other data needs to be displayed with … | |
Re: It goes against the rules of this site for me to give you the answer to your assignment. However this might help: * Make sure that 52 unique numbers are chosen * Use arrays for the string values representing the suits and the card values * the randomly chosen number … | |
![]() | Re: You can still code the subroutine that you want to handle the click event, just without the `Handles` clause(use the subroutine from an established menuitem as a template). In the code that adds the menuitem, use the `AddHandler` statement to enable your subroutine to handle the click event of the … |
Re: It looks to me that you're accessing the wrong index of the array after it's split. The first element in the array is numbered 0 not 1. | |
Re: find returns a `size_t` type or `string::npos` not an `int`. You might want to look at stringstream(<sstream>). This will allow to use the extraction operator(>>) which will automatically find the next space. Also your algorithm is incomplete. If you search online you can find several examples of the rules for … | |
Re: Handle the KeyUp event of the textbox not the form. Then call Conversation when the key code is Keys.Enter: Private Sub TextBoxInput_KeyUp(sender As Object, e As KeyEventArgs) Handles TextBoxInput.KeyUp If e.KeyCode = Keys.Enter Then Conversation End If End Sub | |
Re: * As was noted, you're using the assignment operator(=) not the equality operator(==) to test for the numbers you want to exclude. * Also your description says you want to exclude 2 and 9 but your code seems to indicate 4 and 9. * Your logic is a bit skewed … | |
Re: If you use a RichTextBox you can export the text as an .rtf which will include any format styling you've done, which can then be read by Word. | |
Re: Use the text property and assign the value of another one to it. | |
Re: It appears to me that, you're creating the pictureboxes but you're not adding them to the `Controls` collection of the form. Something like this should work: Private Sub createPixels(layer As Integer) For i As Integer = 0 To 255 For j As Integer = 0 To 255 Dim pb As … | |
Re: something like this should work `vec[row].erase(vec[row].begin() + col);` | |
Re: You'll probably want to look at [Dictionary<>](http://msdn.microsoft.com/en-us/library/xfhwa508%28v=vs.110%29.aspx). This ia basically a collection that is indexed by a key that can be pretty much any type and returns a value which also can be any type. | |
![]() | Re: What code are you using to call the SetParent routine? What is it doing wrong or not doing right? If done correctly and the COBOL form will run correctly it should work. ![]() |
Re: Just from a quick glance see if this helps: `cbinfo.Items(cbinfo.SelectedIndex).ToString()`. | |
Re: Here's a [project](http://sourceforge.net/projects/qmcs/) to look at. | |
Re: Have you tried testing `result` inside the `while` loop and `break`ing if the condition is met? You may have to send an escape sequence to other program to tell it to quit as well. That of course will depend on the program. | |
Re: Your problem is that even though you're reversing the steps you aren't reversing the operations. Which means that your GetPos function needs to be modified to get the character's index from any of the arrays. It should look something like this: int GetPos(char _char, const char char_array[]) { for (int … | |
Re: Using this `#include <string.h>` instead of this `#include <string>` is causing a compiler error. | |
Re: Here's a [reference page](http://www.cplusplus.com/reference/memory/make_shared/?kw=make_shared) that explains it. | |
Re: Here's a reasonably well written [tutorial on arrays](http://www.cplusplus.com/doc/tutorial/arrays/), that should help. | |
|
The End.