1,857 Posted Topics
Re: When I put your code into a new project in VS2012 it runs fine. Could you have 2 `main`'s defined in your project? | |
Re: Plus doesn't `system` always require a string as its argument? | |
Here's a simple class for what it's worth that will do simple base85 encoding and decoding. This only works with the required blocks of data and not large data structures or streams, and does no validation of the data. What it does do is encode a block of 4 8-bit … | |
Re: Try using the [RemoveDirectory function](http://msdn.microsoft.com/en-us/library/windows/desktop/aa365488%28v=vs.85%29.aspx) To copy a folder, you'll probably have to create the new folder and literate through the filea and sub folders and copy them. | |
Re: What part are you having trouble with? Just name the files accordingly. | |
Re: > " Ask the user to fill in the data and print objects information." This means you have to prompt the user to enter the information, then display that information to the screen after. | |
Re: One common area that gets abused is scope. Keep the scope for your objects as short as possible so that they gets disposed of more often. | |
Re: This [tutorial on operators](http://www.daniweb.com/software-development/cpp/tutorials/465375/beginners-tutorial-on-operators) might help | |
Re: I'm wondering if the control was designed for a different version of .net. In your case, it looks like the method the control is trying to access is using different arguments in your version of .net than the one the control was designed in, and it can't cast the object … | |
Re: > Can you suggest another method that I can try? If you read the words directly into a combobox set to simple dropdown style, whatever the user types is automatically searched for and the closest matches are scrolled to. It's a simple matter of using the Datasource property. ComboBox1.DataSource = … | |
Re: First of all do you know how to start a new project? Do you know how to add controls to a form? Do you know how to handle the click event of a button? Do you know how to read and write a file? Do you know what an array … | |
Re: As the Hint in your problem mentions use different loops, one to count the rows, then 2 inside that one. One to count the asterisks and one to count the spaces. A further hint build the beginning spaces and the asterisks into separate strings. If you do it right, it … | |
Re: My experise doesn't run much to database programming or web programming. However the [System.Web.UI.WebControls.GridView](http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx) has a SelectedRow property which should allow you to update just that row. | |
| |
Re: Sorry you couldn't understand my previous code. Perhaps seeing it translated to your actual structures will make it easier for you to understand. Basically I made SwingIdentified inherit from PriceInfo. This way all the common properties are easy to transfer over. I set up an equals operator so that in … | |
Re: Have you tried accessing the table through the tables collection in the dataset without the New modifier? | |
Re: The basic code should work, especially after you put in the missing brace on line 13. I would add one thing though, if you want to use `icons` somewhere else, you should either return it from the method or declare it at class level. If re-instantiating gives you problems you … | |
Re: One way would be to overload the '=' operator in a new struct that inherits the old struct. something like this: struct MainStruct { public: double a; double b; double c; double d; unsigned e; unsigned f; string g; }; struct MyStruct : MainStruct { public: string h; MyStruct MyStruct::operator= … | |
Re: I think you need to supply a sample of the input data you're using and a sample of the data output to the file and an explanation of what exactly is or isn't right. For instance when I use this data: 1 2 3 4 5 I get this output: … | |
Re: Looking back over your posts you seem to be going around in circles. It looks like you've asked this question in different words before. Perhaps, showing all your code, what you're trying to accomplish, and what it's doing wrong and/or what it's not doing right, will get you more complete … | |
Re: Basically it means you declare the variable inside the form code but outside any subs, functions, classes, etc.. Now the variable can be accessed in any code inside the form. | |
Re: You've sort of started along the right idea. Use 3 nested loops and add the multiplication product to the array in the innermost loop: for(int x = 0;x < lenght;x++) for(int y = 0;y < width;y++) for(int z = 0;z < height;z++) John[x][y][z] = x*y*z; | |
Re: It appears that your a1z26() method iterates through the string but it keeps overwriting str2 instead of adding to it. You might be over thinking this a bit. Since char is basically an int, if you cast it to an int, all you need is a simple offset to get … | |
Re: Near as I can tell, that software doesn't come with a programming interface, and I can't find any indication their forum that one is available. The best you'll probably be able to do is use the Process class to control the executable from your program. | |
Re: Try using : Dim heightSquared, height As Double If Double.TryParse(txtHeight.Text, height) Then heightSquared = height * height lblBMI.Text = heighSquared.ToString() Else MessageBox.Show("Height must be a number") End If This will validate the input from the textbox and convert the text to double properly. These kinds of problems abound when you … | |
Re: One quick and easy way to do this, is to load the "ID" as a subitem of the listviewitem. Setting View to 'List', or 'Details' with one column will only show the item, but the subitem is still there and you can access it from the SelectedItem property. In the … | |
Re: If you're using a Validating event handler. Setting e.Cancelled true will send the focus back to the originating cell. | |
Re: You'll probably need a [switch statement](http://msdn.microsoft.com/en-us/library/vstudio/k0t5wee3%28v=vs.110%29.aspx) | |
Re: You might need to brush up on your instructional material a bit more. If necessary, here's a couple of fairly good explanations of how pointers and references work.[Click Here](http://www.cplusplus.com/articles/1075fSEw/) [Click Here](http://www.cplusplus.com/doc/tutorial/pointers/) #1 - p and r are wrong, q is right #2 - p and q are wrong #3 - … | |
Re: it means that 'weight' hasn't been given a value yet; try putting '=0' in the declaration. | |
Re: Your algorithms seem to be ok, the problem appears to be in the swap. You're only swapping the values not the elements of the collection itself. See if this helps: void SelectionSort :: swap(int& one, int& two) { int temp = one; one = two; two = temp; } | |
Re: I notice you're sending the sorted data to a new datagridview. Wouldn't it be easier to just sort the datagridview? It has methods built in designed to do this. You might also want to look at the [DataTable.Select](http://msdn.microsoft.com/en-us/library/way3dy9w.aspx) method, which has a sort option and will return an array of … | |
Re: Here's a simple function that uses pow and outputs a char array(string). Basically it checks if the value is greater than or equal to 2 raised to the power of the loop counter. If so set the character at the opposite end of the char array to 1 and decrement … | |
Re: If you put each column of boxes in its own groupbox you can simplify things quite a bit. you can simplify things even further by using a label with AutoSize off and background color and border the same as the textbox. To add the event handler to all the relevant … | |
Re: It's definitely possible. If this is homework, your instructor should have provided you with material that explains the processes involved. If this isn't homework, or your instructor didn't provide any materials, then you should probably be googling tutorial sites for VB.net tutorials, to learn the basics of what is possible … | |
Re: If you want accuracy you should use double instead of float. A combination of reading the next character in the file and ignore will help you skip the unwanted parts: double f,sum=0; int count = 0; while(!file_id.eof()) { char nextchar = file_id.peek(); if(isdigit(nextchar) || nextchar == '.') { file_id >> … | |
Re: some of your `System` statements aren't terminated in a semicolon and you have 1 too many `else` blocks which puts it and the last 2 statements outside of the `main` block | |
![]() | Re: Each item in the ListView.Items collection has a SubItems collection. The data associated with the Item itself, is actually in SubItem(0). Therefore by iterating through all the SubItems from 0 to SubItems.Count - 1 you can save all the data from the Item. Alternatively if you use a DataTable to … |
Re: If you load the file from the Resources class it will load as a stream. Simply pass it as the argument to the soundplayer: SoundPlayer sp = new SoundPlayer(GC_RunTimeCalculater.Properties.Resources.Button); sp.Play(); On a side note the MessageBox will play a sound aqccording to the icon you use: MessageBox.Show("2nd Temp is less … | |
Re: Your first step should be to flag your post and send the message that the post needs to be moved to the VB.net forum. | |
![]() | Re: It seems to me, your most immediate problem, is not giving `symbol` a value. Without this the `switch` block never executes any `case` statements. Also your `ReadMixedExp` doesn't skip non numbers when reading the file. |
Re: This [Wikipedia article](http://en.wikipedia.org/wiki/JPEG) gives a fairly extensive breakdown of the jpeg file format | |
Re: Every control including the form has they're own KeyPress event, which makes programming for that quite a bother. A more efficient solution would be to give the textbox first tabindex, so that when the form starts the textbox immediatley has focus. This way you only need to program the KeyPress … | |
Re: For some reason the windows form template for c++/cli was included in VS2012 but the references to it were removed. Heres a [link](http://www.t-hart.org/vs2012/) to the files redone so that you can start a new windows form project using the .net librairies(for express usr 'vcprojects_WDExpress' instead of 'vcprojects' in the path … | |
Re: Your immediate problem is you're missing the closing brace for water_bill. This highlights the importance of formatting. If you keep the first statement after the opening brace on a separate line and use proper indentation, these little errors are much easier to find. If your IDE/Compiler doesn't have a formatting … | |
Re: Searching MSDN can be a pain sometimes. When you're using CLR most of the documentation for .net will have a C++ tab in the examples that will show c++ code for that method. Here's the one for the [GetFiles method](http://msdn.microsoft.com/en-us/library/ms143327%28v=vs.100%29.aspx) in the DirectoryInfo class. One thing I've noticed is that … | |
Re: You seem to have some confusion in what you want noble dream microfinance is a banking institution. | |
![]() | Re: You need to re-think your approach a little. you're trying to read the file directly without ignoring the extra stuff in there, like ()+/. For instance here's the ReadMixedExp method redone to get the values in the object: void MixedExpression::ReadMixedExp(istream &in) { // ( 1 + 2 / 6 ) … |
Re: The rows collection should have a 0 count Dim dt As DataTable If dt.Rows.Count > 0 Then 'do stuff End If |
The End.