3,183 Posted Topics
Re: If you're happy with Windows 7, there's no need to upgrade. It's really that simple. Even folks who are still on XP choose to stay despite it no longer being supported by Microsoft. I'm also using a base install of Windows 8.1 for my home system and quite happy with … | |
Re: The target framework for the project needs to be 4.0 or higher. With Visual Studio 2013, unless you changed the framework when creating the project, it'll be 4.5. Also, be sure to reference System.Numerics.dll in your project as well, since it's not a default reference. | |
Re: > maybe @Dani could add a 'Please Mark as Solved' button that users could click to notify the owner of the thread that they should mark it as solved. The chance of that notification reaching the thread starter doesn't justify adding that feature. As mentioned, the majority of threads are … | |
##Why Use Arrays?## Let's begin by considering why arrays might be needed. What is the problem that this feature solves? How does it make your life as a programmer easier? When studying new features, it's important to recognize what that feature does for you and where the incentive is in … | |
Re: Assuming the code is a snippet and not complete, there are only two direct errors (braces instead of brackets on line 6 and `endline` instead of `endl` on line 12). If there are supposed to be 10 errors, you can't make the assumption that headers were included properly, namespace std … | |
Re: I've taught both ways, and high level to low level works better. Going the other way just results in an excessive amount of prerequisites to do anything meaningful, and the student either gets bored or frustrated. Starting higher level while making it clear that there are important things going on … | |
Re: `num3` isn't a `float`, try using the correct specifier in `printf`. | |
Re: Please read our rules concerning homework. We won't do it for you, and require some proof of effort before providing help. | |
Re: File operations are inherently slow, relative to in-memory operations. I'd probably go with writing smaller blocks than dumping all of the file contents to a line for a single WriteAllText call. The framework can handle its own buffering for performance and you can limit the amount of string processing you're … | |
Re: Add a space to the string literal: "upgrade cottage " + listBox2.SelectedItem Will the selected item ever have a leading space? If so, you can add a condition to work with that and avoid two adjacent spaces. However, that's probably not necessary as leading spaces in list boxes are rare. | |
Re: I wonder if that rogue semicolon one line 1 has anything to do with it. ;) My recommendation in general is to always use braces around a compound statement to avoid this and the next related error you're sure to encounter just by deleting that semicolon. | |
Re: > I don't see people use const this way, adding const everywhere they can, let alone const pointers. Is there a reason for it? Probably best to ask the author of such code their reasoning. I can think of a few reasons ranging from not understanding best practice, to encountering … | |
Re: > how can I quote a respose? There a question mark button on the editor that will take you to [this page](http://www.daniweb.com/community/syntax) describing our Markdown formatting. You can also use any of the other buttons for quick formatting without manually typing it yourself. Just clicking the button will give you … | |
Re: Iterators were designed based off of pointers, so a pointer is a form of iterator, but an iterator isn't necessarily a pointer. | |
Re: Please don't just post your assignment. Also post an honest attempt along with the difficulties you're having as proof of effort. Daniweb is not a homework service. | |
Re: The only C++isms you've got are in main and revolve around string I/O. Basically just replace getline() with fgets() and modify the rest of the code to match. | |
Re: > jj++++j*j-- i got the answer 400 but how it is ?help me The answer you get is irrelevant since the entire expression is undefined due to modifying `j` multiple times between sequence points. | |
Re: My only nitpick is a pet peeve in that SpeechSynthesizer implements IDisposable, which one should always respect: using (var synth = new SpeechSynthesizer()) { synth.Speak(message); } It's ironic that MSDN's own examples typically don't respect IDisposable, despite the common occurrance of the following note variation on the same documentation page: … | |
Re: Isn't that why restaurants have only a single person seating diners at any given time? If there's only one gatekeeper, concurrency isn't at issue. | |
Re: Just because `'\0'` is added automatically doesn't mean you *can't* refer to it explicitly. The code is perfectly legal C, but I suspect the OP is compiling it as C++ where `string` is very likely to cause issues due to potentially being exposed as a type name. **The code as … | |
Re: Yes, you can do that. The controller that delivers your page can check the date and either deliver the voting page or an error page depending on whether the date falls into range of your voting period. | |
Re: > if (POSDGV.Rows[j].Cells[2].Value == null) It really depends on how you're storing null values. Likely the check will fail because the cell value is actually DBNull.Value or simply an empty string: if (POSDGV.Rows[j].Cells[2].Value == DBNull.Value || string.IsNullOrEmpty(POSDGV.Rows[j].Cells[2].Value.ToString())) | |
Re: Another potential issue with hardware changes is you may need to reactivate Windows. Typically this only happens with significant changes like a motherboard replacement, but it's not unheard of for minor hardware changes or even non-hardware changes to trigger a reactivation notice. | |
Re: What have you done so far? | |
Re: Two years ago I'd say no way in hell. These days I'd say that appropriately designed tablets can kill the netbook market, though not the laptop market due to simple scalability limits. My current tablet (ASUS T-100TA) is a perfectly suitable netbook as well as a nice tablet. | |
Re: > I know that `malloc` will allocate 1 block of given size and `calloc` will allocate n block of given size. They allocate exactly the same single block of memory. The only difference is how that block is calculated. With `malloc` it's calculated by the caller and with `calloc` it's … | |
Re: > Actually the printf() statement will work according to the stack mechanism i.e., the evaluation (execution) will starts from right side to left side... Yet the compiler is free to actually evaluate the arguments in any order at all. Just because the values might be pushed from right to left … | |
Re: Notification of what, exactly? Does the presence of records in the database trigger a notification or something else? All of the pieces are straightforward, so break it down a bit: 1. Connect to SQL and get data then print it out. 2. Send a test email. 3. Combine those by … | |
Re: What exactly are you trying to accomplish? "Lookup search control" is too vague. | |
Re: Nobody will read four thousand lines of unformatted code to tell you what you did wrong, but judging by the errors I'd wager that formatting it will highlight the error promptly and obviously. | |
Re: You've encountered a common beginner issue. Allow me to point it out more clearly: // This is a pointer to a string literal. You can't modify it. char *text = "GOOOD TEXT ALL TIME VERY POOR "; // This is an uninitialized pointer, you can't read from or write to … | |
Re: A static data member belongs to the class rather than to an individual instance of the class. Likewise with a static member function. A reasonable way to think about them at a high level is to treat the class as acting like a namespace for those members: class Foo { … | |
Re: Nice tutorial. I'll also add that there are usually two situations where forms communicate that affect your choice of how to do it: 1. The forms are not modal and the lifetime of the child form is either long or independent of the code that creates it. In this case … | |
Re: The logic for sorting with string keys is no different than with numeric keys. The only difference is in the comparison, where with string keys you cannot use relational operators. Instead, compare with strcmp(): if (strcmp(a->name, b->name) < 0) { /* a->name is lexicographically smaller than b->name */ ... } … | |
Re: > Things look pretty grim this season. All I need is one good one to be happy. ;) > All my favorite anime series are coming to an end (Strike the Blood, Golden Time, Magi S2, Log Horizon, Silver Spoon S2, Tokyo Ravens. Oh my...) Fall season will find us … | |
Re: The laziness here is impressive. Most drive-by cross posters will at least have the courtesy to copy their other posts verbatim rather than linking to them. Did you read the answer to the question on that other forum? It provides a valuable hint for research. | |
Re: My recommendation would be to use the string class: string names[] = {"monitor", "cpu", "mouse", "joystick", "system"}; The problem with your code is that the "strings" aren't string literals, so they're treated as identifiers that don't exist. Further, the type of your array is `char`, which means each element of … | |
Re: You'll receive better help if you explain how the code isn't working. | |
![]() | Re: An array is a collection of items. To access individual items you need to specify which index in the collection you want (ranging from 0 to N-1): for (int i = 0; i < months30.Length; i++) { if (months30[i] == month) // Now you can test against the entered month … ![]() |
Re: On a side note, it's harder to read posts and titles in all caps. | |
Re: The closest you can get would be a static class in C# with those variables as members. Place that class in a shared assembly (if your project uses more than one assembly) and you're good to go. | |
Re: > Help whom? The original poster is 3 years gone. The original poster isn't the only person a thread might help, that's why we don't close threads after they reach a certain age. > It could be helpful for u if u had brain. Malicious personal attacks will not be … | |
Re: The first error that I immediately noticed is you're not initializing your variables to 0. This means that they'll have some random value, and incrementing that value (on top of being undefined behavior) will accomplish nothing meaningful. | |
![]() | Re: > I just found it as an interesting a little confusing BUT NORMAL behaviour. Yes, it's normal. I can also see it being confusing because there are three issues involved: 1. The console shell will likely be in a state that echoes any input. 2. Standard input functions use whatever … ![]() |
Re: > what I'm wondering is if this OS will be compitable with Vista ultimate?? http://winsupersite.com/article/windows8/windows-8-tip-upgrade-windows-vista-144320 Regardless of what's available, the usual advice for moving up Windows versions is to perform a clean install. Upgrades have improved over the years, but a clean install limits risks to things like hardware compatibility … | |
Re: > I can't set it in the designer too, because that code can/will be regenerated. If the class is obsolete, why would you be changing it such that the generated code is updated? Last I checked, generated code was only updated when you changed the form from the designer. | |
Re: The answer they're probably looking for is `null`, but the question is ambiguous because it greatly depends on what type is being used, where it's defined, and whether the compiler will even let you compile without assigning a default value explicitly. For example, `int` isn't a nullable type by default, … |
The End.