1,857 Posted Topics
Re: If you just want to know if an item exists you can use the Contains method of the Items collection,`CheckedListBox1.Items.Contains("MyItem")`. This produces a boolean true or false. | |
Re: You're adding endl after each result remove it from there and move to after the j loop. something like this: for (int i = 0; i < die1; i++) { for (int j = 0; j < die2; j++) { cout << dice[i][j] << "\t"; } cout << endl; } | |
Re: > By default, the collection of lines is a read-only copy of the lines in the TextBox. To add text use the AppendText method. It's probably not used much, since the listbox does basically the same thing and more and is much easier to use. Here's the [MSDN article on … | |
Re: Welcome to Daniweb. If you have a problem with your code, show us the code and outline what you're trying to achieve and what the code is doing wrong. | |
Re: Instead of using string builder, a string array, declared to the size you need and initialized to null strings, will allow to assign the coordinates in which ever order you need. You could even go so far as to use a function to assign random indexes. Then use the Join … | |
Re: You can still use the standard C++ methods like cin: #include "stdafx.h" #include <iostream> using namespace System; using namespace std; int _tmain() { int i; cin >> i; Console::WriteLine(i); Console::ReadLine(); return 0; } | |
Re: Dictionaries are simpler than they sound. Basically a dictionary is a list that instead of accessing individual items by their index number each index is given a name. Thus, just as, a list (MyList(3)) returns the value associated with that index, a dictionary (MyDictionary("vegetable oil")) returns the value associated with … | |
Re: It might help to change the properties sorting to alphabetical then you can more easily find controlbox, maximizebox and minimizebox. | |
Re: We need to see the recursive function and code where the function is called. I strongly suspect, though, that you're declaring a new progressbar each time the function runs. You should probably declare the progressbar at class level and just update/increment whenever the function runs. | |
Re: Like was mentioned you've used a keyword as a custom type. Line 18 has nothing to do with that error. Change the name of your struct. | |
Re: If the two `var`'s are queries you should declare them as such. Otherwise the compiler won't know exactly what you're talking about. Also it's my understanding that queries don't actually hold any data until they're enumerated. You probably should use some sort of structure to hold the data from each, … | |
Re: > basic constructors [Constructors](http://www.cplusplus.com/doc/tutorial/classes/) are basically a way to force initialization of class members. > copy constructors [Copy Constructors](http://www.cplusplus.com/articles/y8hv0pDG/) are used when you need to copy your class object to another object and the default copy constructor won't do the job. You might want to bookmark that site, I find … | |
Re: Here's the first place to [start](http://www.daniweb.com/community/rules) | |
Re: [Click Here](http://social.msdn.microsoft.com/Search/en-US?query=.net%20matrix%20library&refinement=501%2C109%2C117&ac=5) | |
Re: Most user input is a string. You probably have to cast the input to a number before you do your calculations. | |
Re: Show the code and outline the errors. Unless you're willing to pay someone to do the work for you, in which case you should be in Jobs and Resumes forum. | |
![]() | Re: You can reference the folder where the app is running by using the Application.StartupPath property. In .net the [SaveFileDialog class](http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx) is used to save a file. You could also go with a simple [InputBox](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.interaction.inputbox.aspx) to request the new file name. |
Re: When I search `throw exceptions c#` through google, shockingly I get over 2,000,000 hits. Here's a [link](http://msdn.microsoft.com/en-US/library/vstudio/1ah5wsex%28v=vs.100%29.aspx) that discusses the throw statment. Here's a [link](http://msdn.microsoft.com/en-US/library/vstudio/ms173160%28v=vs.100%29.aspx) that discusses exceptions and exception handling Since no code is run during compiling the only exceptions that get thrown are from bad code. | |
Re: Show the code that displays the dialog form and any sub routins it calls. | |
Re: Show the code you're using to do the search. | |
Re: Define link. As long as the forms are in the same project they are all linked. | |
Re: Loop through the Cells collection of the row you want to display and assign the value of each one to a textbox. To make this easier you can load a List(Of TextBox) with the textboxes from the form and sort it by the names. Now the index of the textbox … | |
Re: Really hard to say what could be causing it without seeing some code. Are you writing your own dispose method? | |
Re: > I would like to know what I need to do to pass this string to my boolcheckpassc(char *) function and if you just explain it in plain words that would be great cause I am lost. Your prototype(`bool checkpassc(char *);`) has to agree with your declaration of the actual … | |
Re: [Visual Basic Tutorial for Beginners](http://www.vb6.us/guides/visual-basic-6-beginners-guide) | |
Re: If you keep all your ebooks in one folder you can minimize the search time of the GetFiles method. If you use DirectoryInfo.GetFiles you can put the results into a List<FileInfo> and sorting is very easy with a delegate to compare names. Using that as the datasource for a listbox … | |
Re: Assign the data to a datatable. Use that as the datasource. Loop through the rows and cells of the datatable. | |
![]() | Re: For that ypu might be better off creating a form with all your data presented how you want it to look and use the printform control. |
Re: You can also use a comprehensive c++ reference site like [cplusplus.com](http://www.cplusplus.com). It's got its own google search for its site. | |
Re: Format is a string function. Since it returns a text string, your problem is probably somewhere else. Either in the format you're using, or the data type the database expects, isn't what you think it is. | |
Re: How are you adding the event handlers to the other labels? | |
Re: Here's a couple of links discussing tiff file format: [wikipedia](http://en.wikipedia.org/wiki/Tagged_Image_File_Format) [Tiff Fax](http://tools.ietf.org/html/rfc2306) Examine the output of your converter and see if the format agrees. | |
Re: Anchor won't work since you don't want the tabcontrol right to the top, and dockstyle.fill won't work for the same reason. Here's one way: In the designer, size the control to reach the bottom of the form and have the top where you want it. Set the dock property to … | |
Re: Conversion depends on the format of the pdf. if it's text converted to pdf you might be able to use this [library](http://itextpdf.com/itext.php). If the pdf is made up of images of text(i.e. scanned pages), then [this](http://www.codeproject.com/Articles/160868/A-C-Project-in-Optical-Character-Recognition-OCR-U) might help | |
Re: Umm, do you mean `tolower(char c)`? OP's going from upper to lower. | |
Re: Something like this should work: Private Function ABC(ByVal xyz As Integer) As Integer If xyz = 0 Then ABC = 0 Else ABC = xyz + ABC(xyz - 1) End If End Function It's hard to be 100% sure since the code you submitted isn't consistent, and you haven't mentioned … | |
Re: A sub might be useful: Private Sub CreateChild(Title As String) Dim ChildForm As New FrmComponent ChildForm.MdiParent = Me m_ChildFormNumber += 1 ChildForm.Text = Title ChildForm.Show() End Sub Now whenever you need a new form of type FrmComponent simply call `CreateChild("My New Title")` | |
Re: Once you have the code parse it for links and store any links from the same site, download each page, and repeat the same procedure for each page. | |
Re: Here's a place to [start](http://www.daniweb.com/software-development/cpp/threads/447412/forming-an-x-in-c). In particular look at the post I made. The code isn't exactly like you describe you want. But the principles are explained and the code is simple and easy to adapt. | |
Re: Take a look at these threads: [Click Here](http://www.daniweb.com/software-development/cpp/threads/110932/restaurant-menu) [Click Here](http://www.daniweb.com/software-development/cpp/threads/116022/restaurant-menu-program) | |
Re: Use the load event handler. Double-Click on an empty spot on the form and a code stub for the handler will be shown in the code window. | |
Re: A quick note about your code. If you use a multidimensional array you can avoid that whole switch block, which shortens your code considerably. Also there's one function you should become familiar with, round. When you're changing dollar amounts by percentages you want to round the result to 2 decimal … | |
Re: First off doing increment in a loop is alot easier with a for loop, which is designed for that. In the first instance, the numbers you are seeing are the result of `count*(count-2)`, not the value of count In the second instance count is compared to 0 before it is … | |
Re: I'll assume the very basic and simple skills of writing a menu aren't beyond you, and that you need to learn file handling. Here's a [tutorial](http://www.daniweb.com/software-development/cpp/threads/6542/fstream-tutorial) that should help. For general C++ reference I like [cplusplus.com](http://www.cplusplus.com/) | |
Re: You might need a parameter that defines the number of fields in the array and number of elements in each field. | |
Re: Here you're calling word_list but passing choose_list and random_word which aren't initialized. string random_word; string choose_list; string HWLF = word_list(random_word, choose_list); | |
Re: I get the same from your code. You could probably confirm this better by using AD's suggestion of one account class declared twice one as Checking and one as Savings. |
The End.