1,443 Posted Topics
Re: Are you testing the VerifyQuantity function or the values coming out of the DataGridView? If you are testing the DGV, you could add a watch to "DataGridViewRCC(3, i).Value" to see what you're getting. (...or even a MessageBox of the value) If you are [I]actually[/I] testing the VQ, maybe casting the … | |
Re: Does it work on other machines? Sometimes IntelliSense loses "its mind", but later comes back. If you put that class on another machine, it will probably show properly. Also, if there is a .NCB file in the project, delete it and let it rebuild. -- this might only be present … | |
![]() | Re: What about the .find() method on the string? Example: [CODE] #include <iostream> using namespace std; int main(int argc, char* argv[]) { string strBase = "this is neat"; string strOne = " be "; string strTwo = " is "; cout << ((-1 == strBase.find(strOne))? "Not Found" : "Found") << endl; … ![]() |
Re: Store the fuel and distance data in a text file (or database). Make the class read and calculate the data. Have you started on any of this, yet? Do you have the data file ready? | |
Re: Your Person class will need to have a Vector of addresses. When/if you call add address, it adds one to the vector, | |
Re: In simple terms, you will need to: 1) Create an ODBC entry (in ODBC Administrator) for the specific Access Database 2) Create an MFC recordset to bind a class to the query (to the table or tables) 3) Use that recordset in your regular code to retrieve the data. Here … | |
Re: I'm not real sure, but maybe you can call .Update() on that adapter. [url]http://msdn.microsoft.com/en-us/library/aa325460(v=VS.71).aspx[/url] | |
Re: [url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url] What you've asked can be simple or complex based on what programming you've already done. For me, the real magic of classes doesn't happen until I get to the SECOND object in a collection and I realize how much code I didn't have to write (or test) to use … | |
Re: Are you writing in a directory where you have permission? What happens if you trap exceptions? This worked for me (with an existing directory called c:\science): [CODE] #include <fstream> using namespace std; int main(void) { fstream output("c:\\science\\fOut.txt", ios::out); output.put('a'); output.close(); return 0; } [/CODE] | |
Re: Almost. Instead of adding it to the list and then deleting it from the list, either: 1) Check it before it goes into the list and DON'T ADD it if it matches the ID. 2) Add all to the list and just DON'T OUTPUT it to the new file if … | |
Re: Here is a really scaled-down rendition of what you're describing. I use LINQ to name the columns and everything falls into place without much effort. This just grabs the first three characters from each word and separates them into the cells of the grid. Assuming you have a DataGridView named … | |
Re: Make a subtract function that takes two parameters (you can even [URL="http://msdn.microsoft.com/en-US/library/ms379564(v=VS.80).aspx"]use generics[/URL], if you want). Make the subtraction action return the result. Use only that function for subtraction. Don't overcomplicate it. | |
Re: There are a lot of previous projects listed on DaniWeb doing the same thing in various languages. [url]http://www.daniweb.com/search.php?q=human+resource+management[/url] How comprehensive will be your system? Will it be like the one in the video or something simpler? Are you going to make this for the web, graphical desktop or console? | |
Re: I use the same techniques (every time) to load data into a collection of custom classes. Sometimes, I want to display the status of what's being loaded. If I'm using a WinForm or a Console App or an ASP.NET page, the method to display will be different, but the name … | |
Re: There is still the looming question of: Do you really need pointers if you are going to use C#? | |
Re: If you're running this from Visual Studio, you can set a breakpoint on your last line and the program will pause there. Also, you could actually run the executable FROM the command-line (instead of Visual Studio or double-clicking an icon). | |
Re: You should load the entire contents of the Rich Text Box into an array or list of strings separated by CR/LF, modify them based on your criteria, then overwrite and append all of the text. | |
Re: You will need to call Dispose() on any attachments. Here is an example (in C#), but you can easily translate the Dispose(). [url]http://geekswithblogs.net/THines01/archive/2011/07/14/attachmentrelease.aspx[/url] [Translated (uses Linq)] [CODE]mail.Attachments.ToList().ForEach(Sub(a) a.Dispose())[/CODE] | |
Re: Why do you want this in an object array? You really wouldn't be better off. A better approach might be to move the data into a class and make an array or list or dictionary of the class based on how you will use it/them. With a collection of classes, … | |
Re: Is your settings.xml malformed? Have you looked at it (with a text editor) after you created it? | |
Re: Are you saying you want to execute a python app from a C# app (with a button-push)? | |
Re: Are you attempting to do a SubQuery in Access or are you wanting to join two tables? [url]http://www.ehow.com/how_6955614_do-subselect-query-access.html[/url] | |
Re: You can use int:: Parse(...); [CODE] //from memory int i = int::Parse(reader["ID_int"]->ToString()); [/CODE] | |
Re: OK. Here is a method of getting started. You will still need to [B]Read[/B] a [B]Line[/B] from the input file in a looping manner and [B]Write[/B] a [B]Line[/B] to the output file. But with this example, you should be able to see what to read in the help file or … | |
Re: Yes, you can use a WebClient and perform an OpenRead on the file. You can also use the FtpWebRequest and get a Response Stream. | |
Here are two examples of opening read streams to files on an FTP server. One example uses the FtpWebRequest method. One example uses the WebClient method. Here is a method of testing those functions: [CODE] using System; using System.Diagnostics; using System.IO; using System.Net; namespace UseFtpStreamExample { using FtpReadStreams; class Program … | |
Re: These instructions are very clear. Have you written any part of this, yet? | |
Re: Are you saying you want your code inside your header file? ...or something else? | |
Re: [CODE] public Form1() { InitializeComponent(); for (int i = 1980; i < 2051; i++) { richTextBox1.Text += i.ToString() + '\n'; } } [/CODE] | |
Re: [CODE] node *head = new node(); [/CODE] ...then after calling new, you're setting it to NULL. | |
Re: [CODE] using System; using System.IO; namespace DW_402919 { class Program { static void Main(string[] args) { string[] arr_strFiles = Directory.GetFiles("*pathToFilesOnServer.*"); foreach (string s in arr_strFiles) { Console.WriteLine(s); } } } } [/CODE] | |
Re: Well, what is cv::Mat() supposed to be? Can you find it in the cv.h file? ...was it supposed to be your own CvMat instantiation (sublcassData)? | |
Re: So, you need to change the selection of a dropdown list ao the sheet will recalculate? Wondering: if you had a VBA macro that could do that, could you call the macro from C#, then pick-up the values from the sheet? | |
Re: You will need a class with all of these fields defined. Like your last project where you used a KeyValuePair, you will need to create a class. Each field of the "record" will be populated by a row in the file. When you've collected 5 rows, add that record to … | |
Re: [url]http://www.daniweb.com/software-development/csharp/threads/401369[/url] There are a few TimeSpan examples in that post. | |
Re: Do you have other third-party libraries that do show in the class view? | |
Re: Here is a video of someone talking about a [URL="http://www.youtube.com/watch?v=WlX25SDE5ps"]c++ project with Allegro[/URL]. Here is a page talking about [URL="http://www.cppgameprogramming.com/cgi/nav.cgi?page=allegbasics"]the basics of Allegro[/URL]. As @mikrosfoititis states: It really depends on your expectations. Where do you want it to run (PC, Phone, Dedicated Game Box)? Do you eventually expect to sell … | |
Re: 1) Not that this will help, but I would first initialize those numbers to zero in a constructor. 2) Something like this should run fine and true in the debugger. 3) What do you mean "F" increased in value? | |
![]() | Re: That add command will not do what you think. Since there is no dollar sign terminating the [B]first[/B] name, just do the int 21h/09h with DX set to the address of the [B]first[/B] name. It will continue printing until it hits the dollar sign after the last name. ...which means … ![]() |
Re: Where is the code that tells the form it has new labels? | |
Re: Your string [CODE]"[name] =@name, [phone]=@phone1 WHERE (id = 10)"[/CODE] ... calls the param "@name", but your [CODE]cmd.Parameters.AddWithValue("@name1", name);[/CODE] ... calls it "@name1" They should be the same name. Also in the string "[name] =@name, [phone]=@phone1 WHERE (id = 10)", please remove the space between the closing bracket and the equal-sign. | |
Re: [url]http://www.daniweb.com/software-development/csharp/threads/394475[/url] I see you have already seen the post at that link. There is a lot of good information there. | |
Re: In C#, static members/methods are referenced with a dot and in C++, they are referenced with a :: That is called a [URL="http://en.wikipedia.org/wiki/Scope_resolution_operator"]Scope Resolution Operator[/URL] ...but those are just syntax differences between the two languages. Later, you will notice things allocated with gcnew will be decorated a caret ^. All … | |
Re: Is there something wrong with using a service reference? If you're using C#, it might be the best thing. Otherwise, can you go directly to the database? | |
Re: I get the error: [B]"Server returned a fault exception: [-32700] parse error. not well formed"[/B] ...regardless | |
Re: What's your best language? | |
Re: Would it need to run across multiple files in a project? Would it need to ignore library calls? In windows, the fc command can compare two files, but it's not very robust. Would compiling two programs and comparing the executables be of any benefit? - That would at least let … |
The End.