1,443 Posted Topics
Re: I'm confused on what you're actually trying to do. So, without "correcting" any of the code, I split it to contain two methods. Check these out and see if they are what you're intending to happen when the elements are counted. After that, maybe you'll want to convert that arr[][] … | |
Re: My "mentor" always put the constant on the left side of the equal sign so that would never happen (starting back in the C days). [CODE] if(0 == Fire) { } [/CODE] That way, if you leave off an equal sign, the compiler will catch it. Yes, of course, if … | |
Re: I created a table and added a column as a DateTime. I left the date to be inserted as a DateTime and made no conversions on it and it inserted. [CODE] Imports System Imports DB_SqlLister ' keeps connection info Imports System.Data.SqlClient Module Module1 Sub Main() Dim dateEnd As DateTime = … | |
Re: [url]http://itwriting.com/htmleditor/[/url] [url]http://www.dreamincode.net/forums/topic/48398-creating-a-wysiwyg-html-editor-in-c%23/[/url] | |
Re: Well, I rearranged some things and counted parentheses and moved the function back inside of the class: I also commented out the last line because the values are not yet set. You should be able to fix it from here. [CODE] import javax.swing.JOptionPane; public class Diamond { private static void … | |
![]() | Re: Your program seems to be out of order. Can you explain the order the questions are supposed to have? |
Re: You can use the system() command to open the gedit with the parameter of the file name or you can use some form of spawn(). | |
Re: You will need a routine that finds the greatest common Divisor, then divides both the numerator and denominator by that number. | |
Re: Can you use SQL Server as the back-end to Access and keep a link between Access and the XLS? | |
Re: offset is the position relative to the start position. In the string "ABCDE", the "A" is at offset ZERO (0) while the "D" is at offset THREE (3). If I start at the "D", the "E" is at offset ONE (1). | |
Re: Yes, it's possible, but you will eventually mimmick the behavior of a Hash Table (or Dictionary) of of a DataSet and DataTable (the HARD way). | |
Re: You can put an "if" statement right above the addition that checks the value again. ...or you can redesign how you evaluate the terminating number. | |
Re: The first problem I see is the "if (atoi(name_len>max_name))" should be: [CODE] if (atoi(name_len)> max_name) ... [/CODE] The other potential problem is that you should read the entire person structure before evaluating. If the items written to the disk are all the same size, you can read it as a … | |
Re: It really depends on the class interface. It also depends on your actual question. Are you asking how to get the filepath FROM a save dialog box? [CODE]SaveFileDialog sfd = new SaveFileDialog(); sfd.ShowDialog(); MessageBox.Show(sfd.FileName);[/CODE] Are you asking how to pass the filepath to the class? This will REALLY depend on … | |
Re: First, your function needs to operate on something specific, like a list or array of integers. You will need to collect the total in a variable (I called mine intTotal). You will need to loop for the total count of elements in the array until you reach the end. If … | |
Re: You could be looking for an "Interface". Consider this: [CODE] using System; namespace DW_389664 { public interface IRouteType { string getData(); } public class CRoad : IRouteType //a class based on the interface { public string getData() { return "Marlton Road"; } } public class CPath : IRouteType //a class … | |
Re: You really need two more things: 1) A mentor 2) A real project Nothing teaches like a real project where someone else will be looking at your code. A mentor can lead you through the quirky things that will never be explained in a book. | |
Re: If I understand your question correctly: You want to insert new records and update existing records in SQL Server based on the content of a spreadsheet. Then you want to export that entire database back into a spreadsheet. Is that correct? If so, are you familiar with programming either side … | |
Re: Make sure there is a carriage return at the end of the last line. Some compilers are picky. | |
Re: You will need to install a compiler (if it does not have one). I REALLY like Visual C++ Express for such circumstances (as it is free). | |
| |
Re: If your file is based on line-count, you can quickly count the lines and decide how many to keep. On the second pass, capture the last x-number of lines and write them to a temp file (or store in an aray). Close the original file then OVERWRITE it with the … | |
Re: With Turbo Pascal, there was a utility that would convert ANYTHING into a .obj file (BinObj). I did that a couple of times to embed graphics and text into the EXE. It truly was too much work for the benifit. In C, I guess you could store the data in … | |
Re: If the user enters 14, will it ask 14 times or will that be a different question to ask? | |
Re: Compile the .cs as an assembly/class library (.dll) and include it as a reference to the project. | |
Re: I would use the RegEx replace method to eliminate everything except digits. [CODE] Imports System.Text.RegularExpressions Module Module1 Sub Main() Dim s As String = "June2009 - May2010" Dim arr() As String = s.Split("-") Console.WriteLine(arr(0)) Console.WriteLine(Regex.Replace(arr(0), "[^0-9]", "")) Console.WriteLine(Regex.Replace(arr(1), "[^0-9]", "")) End Sub End Module [/CODE] | |
Re: If they are willing to "help", just have them update a database table with the new members and you can go query it when you need to. | |
Re: I have to ask: why not Visual Studio (or Visual C++ Express)? | |
Re: It REALLY depends on what you're expecting to see. Here is a 90 second YouTube video that gives a fair explanation. [url]http://www.youtube.com/watch?v=2dan4hJlOv0[/url] | |
Re: Change your readShip and readHarbour function signatures to accept the pointers of your structures. Example: [CODE] typedef struct HARBOUR { int harbourId; int maxCap; int timeUpload; double amount; } harbour; void readHarbour(harbour* docks) { // code goes here } int main(void) { harbour docks[100] = {0}; readHarbour(docks); return 0; } … | |
Re: Comments with three slashes are used by the compiler to create documentation and class-diagram properties. You can do this backwards also by creating a class diagram and populating the comments fields. You will see those attributes populated in your code. I have never used a class diagram in C++ code … | |
Re: When a company like MIcrosoft leaves out a core feature like Intellisense, it seems more like attempted murder. #vs2010. | |
Re: The code is already counting chars with CX, so you can jump out of that loop when CX hits 4. You can also replace that Int21h/01h with Int21h/0ah (Buffered STDIN Input) where DX is the address of your input buffer and the first byte of that buffer is the maximum … | |
Re: Here's one: [url]http://www.youtube.com/watch?v=cogSg8lyDMs[/url] | |
Re: The method is just badly named. I should maybe be called GetAnnouncedUnitType(string whichOne) The parentheses let you know the string is being passed as a parameter to the method. | |
| |
Re: It is an agreement (or conversion). If you ( d ) ecode or ( u ) nassemble that command in DEBUG in dos, you will see the op-codes [B0 61]. [CODE] -a 100 13B3:0100 mov al, 61 13B3:0102 -u 100 13B3:0100 B061 MOV AL,61 [/CODE] Each of those convert to … | |
Re: Use the system command containing the same command you would use to format a floppy. The volume name and other atributes are controlled through parameters. You can also use one of the forms of spawn() | |
Re: I would create a Win32 Console app with MFC Enabled. I believe, however, Windows 7 comes with .NET installed. Since you are doing this on Windows boxes, MFC is still an option. I set the character set to be MultiByte and Ignored Library: MSVCRT.lib This will compile under warning level … | |
Re: For the password, you should use ExecuteDataReader() | |
Re: Use the class wizard to create a CRecordset . | |
Re: Have you written any part of this, yet? If you truly understand your requirements, this is an extremely simple program. If you don't (at lest) learn this part, you will never understand programming (especially in C++). First ask yourself WHY values from 0-9 are not going to be printed. | |
Re: Think about the GUI after you think about the classes that represent the pieces and their values (ranking) and the arrays or objects that will represent the board. Think about the GUI as only the input/output mechanism once the other stuff is determined. | |
Re: You need to reset your bool to false on each loop inside the Read(){}. If you don't, the first "true" will cause all subsequent tests to be "true". Also, please use the [ CODE ] tag to show your code as it gives code a proper layout. | |
Re: Is it possible for you to store the image on a server and store the link to the image in the database? | |
Re: It doesn't seem like you need to create a Custom Data Provider. What it sounds like you need is simply a method of having your WCF methods query a database and return some values, right? If so, what is the database type? | |
Re: Are you saying?: 1) you have a file of numbers 2) you want to find and replace numbers (or ranges) in that file that are input by the user or 3) you want to find and replace numbers in that file that are given to it by the program | |
Re: The "standard/common" lowest element is representing a standard (non-extended) character is the byte. A byte converts to a char based on its placement in the character map/chart (ASCII if you're using ASCII). What OS and Compiler are you using? |
The End.