183 Posted Topics
Re: What worked for me: I created a form with 2 pictures and a command button. I loaded an image in Picture2 during design-time and left Picture1 empty. I then used this VB6 function to copy the image when I clicked the command button that I called cmdCopy. Sub cmdCopy_Click() Set … | |
Re: In line 51, you declare the prototype for a function, but I think you actually do not need lines 51 and 52. They look like they are getting in the way, so remove those two lines and see what happens. | |
Re: You will need a table with your bookings. Room_Number, Customer, Booking_Start, Booking_End. Primary key is Room_Number + Booking_Start. Unique key is Room_Number + Booking_End. Foreign keys are Room_Number (to table Rooms), Customer (to table Customers). To check if a room has already been booked for a new booking do a … | |
Re: The first thing you do in `main` is pass the uninitialized pointer `num` to `free_allocated()`. This is probably a mistake, especially considering what `free_allocated()` does. I realize this is a much smaller issue than the other things mentioned, but it can cause things to blow up just as well. | |
Re: If you want to add this question to the C++ FAQ, please read that thread and then add it to that thread in an appropriate manner. | |
Re: You are mixing your types. Let's do this in two steps. enum mem_types { SRAM, FRAM, EEPROM, FLASH }; enum mem_types volatile *MEM_TYPE = NULL; An enum is a list of constants, so there is no need for the `const`; in fact, it gets in the way. You then specify … | |
Re: The add and multiply member functions return their results, so you need to store that result to be able to use it later. They do not modify the original object. Also, rather than using the void constructor, try using the 2-argument constructor. So starting on line 18: System.out.println("Sum:"); x = … | |
Re: The problem is on line 14 of the CharStack driver program. You are assigning integers to char. You might want to change that line to store actual chars instead. The integers were being interpretted as ASCII character codes. Try `char A=65; cout << A <<endl;` to this in action. Every … | |
Re: When you *declare* a pointer, you use the `type *name` convention to say, make a pointer of this type called name. After that, the compiler knows that *name* is a pointer, so you don't have to keep reminding it that *name* is a pointer by adding a splat (`*`). In … | |
Re: Just looking at software applications and software applications still gives a huge amount of possible topics. What kind of thing are you interested in exploring? Once you have your *topic* well-defined, the title should be easy to define. | |
Re: Why are you over-writing ulEndVal near the end? What values are you getting vs. what values are you expecting? How does it not work? On line 11, do you want to use `ulStartVal` or `ulEndVal`? | |
Re: Is that your address at the end? **Please** do not include that kind of thing in these forums. That can just be asking for troule. You are already registered and that is enough identification. I have written computer players for other games before, but I do not know Canasta. For … | |
Re: Please narrow down how this is "not ok". What kind of errors or misbehaviours do you get? Please be as specific as possible. What are the rules of the game and how does your program not follow them? Avoid the use of `goto` in your code. Examine the keywords `break` … | |
Re: MS-Access has the ability to create links to tables in another database in the list of tables. In Access, Under `File - External Data - Link`, select the needed table in the other database and provide the credientials (username/password), if needed. You may want to rename the new table link … | |
Re: As stated in the earlier posts, *n* non-negative integer values less than *n* without duplicates would be all the integers from 0 to *n-1*. So read in all the numbers, and then run another loop to just print all the integers from 0 to *n-1*. No need to actually store … | |
Re: At this point, there is not much point in trying to rename your project's Namespace, unless you have a real need to do so. The users of your application will not know what the namespace names are, so generally, it is not that important to change it at this point. … | |
Re: What kind of invariants are you thinking about here? | |
Re: Think about what kinds of things and processes you want to model in your program. Determine what information is needed for each object. For a person, that might include name, date of birth, address, etc. or it might not. You have to deside what information is important for each of … | |
Re: Ensure that you have normalized your database fields and tables properly. You actually need (at least) two tables to store your multiple-choice questions: **Questions** and **Answers**. **Questions** will have the question number (primary key), title(optional), question text and the correct answer number(s). You could add other fields, but make sure … | |
Re: Let's look at the elements of this program. It looks like you will have an input phase, where you will have to store some entred information, and an output phase, where you display some analysis of your input data. The "sequential" programming means that instructions are to follow each other … | |
Re: Can you provide some code that demonstrates the effect you are asking about? | |
Re: We may give you advice on performing a task, but you have to show that you have put in some effort. We do not do your homework for you. Please post the source code you are having problems with and we will see what advice we can give you. | |
Re: Probably the most efficient way to do this is to look through the string, looking for whitespace. When you do, loop through the string from just before the whitespace back to the beginning of the word, outputing each character. Then output the whitespace, then set the beginning of the next … | |
Re: In the Chrome or Chromweb browser, to see the HTML code, right-click on a page away from any links. A dialog will pop up; choose "View Page Source" to view the HTML code of the current page. | |
Re: Where is the code that is giving you trouble? Are you using DAO or ADO, both, or something else? Errors in the 3000+ range are typically error states in the database engine interface, like using invalid parameters or trying to write to a read-only recordset. Error 3051 means the database … | |
Re: Take a look at your list of toolbars (`View - Toolbars`). If you see one called ODesk, turn it off. If not look at `View - Sidebar`; there might be something added there. | |
Re: This kind of thing is entirely up to your operating system. Threading is meant as a way to split your program execution up to run on multiple CPUs/cores for reduced time of execution, but it is up to the operating system if it does that. All your threads could end … | |
Re: A `SELECT` statement only reads information; it does not update anything. There is a lot of code missing around this that is needed to actually do anything useful. Please post more complete code (that will actually compile) or post the error message when you try to compile. | |
Re: Man, while we in the Toronto area got some snow this weekend, it seems that the guys down in the area north of NYC really got nailed. First Sandy in the fall, then this mess in the winter. Makes me wonder what might happen in the spring. My sympathies and … | |
Re: Ignore this reply. Look below. | |
Re: So what specifically are you trying to do and what is it not doing that you are expecting or what is it doing that you are not expecting? | |
Here is a class I wrote to manage the MRU in a VB.Net application am writing. I did not find a build-in class in Visual Studio or on-line that did not look like a pain to use, so I made my own. While I have some 30 years of programming … | |
Re: A string using double quotes automatically includes an null character (`\0`) at the end. So it is trying to copy 7 characters into 6 spaces, 5 for **HELLO** and 2 null characters. Avoid using the null character in the string literal. | |
Re: Also, if you want to recreate the structure of the existing binary tree, use a pre-order walk instead of an in-order walk. void printtree_recursion(FILE* OutFile, struct node *tree) { if (tree!=NULL) { fprintf(OutFile, "%s %d\n",tree->word, tree->lineNumber); printtree_recursion(OutFile, tree->left); printtree_recursion(OutFile, tree->right); } } | |
Re: I am going to take your code snippet and clean it up. When posting programming code, use the **Code** button and insert the code in the window that pops up. C++ and related languages are very case-sensitive, so `Int` and `int` are different things. All keywords in C++, including types … | |
Re: This is where an `if ()` statement comes in. It allows you to take different paths depending on a logical condition, like *Is n greater than 1?* if (n>1) An = n*n/4; //n*n is n-squared. else An = 1; | |
Re: What is the construction of this sorted matrix? I am assuming that it is a 2-dimentional set of linked lists, by the way you worded your question. The first linked list runs vertically. Each node of that linked list starts another linked list of the actual values. The matrix is … | |
Re: What Linux are you trying to install? What version? What type of hardware do you have? At what point is the installation failing? Did any messages appear? The more details you give, the more likely we are going to be able to help you. Generally it is better to give … | |
Re: This is a rotating queue, so do not compare your head and tail to fixed points around the array to determine if it is full or not. You have to compare the head and tail positions to determine if the queue is full or empty or whatever. You should probably … | |
Re: Do not include `<conio.h>` unless you are using the functions etc. defined in there. Besides, it is not part of the standard and your code might not work with other compliers. Before each `scanf()`, put `fflush(STDIN);` to make sure the input stream is empty. Another thing to do is check … | |
Re: The problem here is that a spreadsheet is not a database. Yes, both can be used to store information, but a spreadsheet is designed to manipulate that information, but a database, like Access, is designed to provide efficicient storage and retrival of the information. An Excel spreadsheet can only be … | |
Re: `cin>>answerBoss;` is reading an integer. When it gets to the first character that does not fit the pattern for an integer, it stops reading, and puts the naughty character back on the input stream. This would include the new-line character at the end of the input stream. To get around … | |
Re: My favourite dialog box says "Your task has completed successfully." So beautiful and so rare in some situations. Oh, yeah: "I'm the son of a seacook!" - Mortimer Brewster (Arsenic and Old Lace) Who remembers, "America is advanced citizenship. You have to want it bad!" despite the grammar error in … | |
Re: You are assuming all your pointers are valid. You should check for NULL pointers before assigning to pointer targets. I would recommend using references to return the results instead of pointers. Otherwise, a nice idea. | |
Re: Web 2.0 websites are ones that use a lot of client-based interaction with the users, often with significant communication back to the webserver. This does not include websites that do the additional interaction using Java applets; that was part of Web 1.X. In Web 2.0, the main page is loaded … | |
Re: Take a look at the `make` command, which is made specifically for this kind of thing. Just create a `Makefile` in the same directory as the source file(s). You can even try this without a `Makefile` and `make MyPrg` will compile the file based on the defaults. #Makefile MyPrg: g++ … | |
Re: Commodore Basic on CBM-80. It had built-in disk commands that the later Commodore Basic 2.0 on the Commodore 64 did not have (my programming language for most of high school). Then WatCom Structured Basic (at high school). In post-secondary, I worked with Unix shell scripts (sh, csh), awk, C, Pascal, … ![]() | |
Re: Do you know how to sign the document with a security certificate? That can help prevent tampering. If someone else (without your certificate) edits the document, it breaks the signature. BTW, unless you created fill-in fields on your PDF page, somebody with Adobe Reader (or equivalent) will not be able … | |
Re: Line 83/153/155/etc: Have you actually tried these SELECT statements as actual queries against your database? The field(s) specified in the SELECT field list are not the fields in the GROUP BY clause. Generally, the field list of a SELECT statement with a GROUP BY clause should include only the fields … |
The End.