3,183 Posted Topics
Re: [Hash Tables](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx) [Hash Functions](http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx) | |
Re: The following is completely unnecessary: pina=NULL; pinb=NULL; pinc=NULL; free(pina); free(pinb); free(pinc); Calling free() on a null pointer is a no-op, and because you immediately call malloc() for each of those pointers, there's really no purpose in setting them to NULL to begin with. A glaring problem is that you allocate … | |
Re: Buy a beginner's book, read it, and follow the instructions. When you have a specific question or difficulty, feel free to ask here. Daniweb isn't a replacement for learning resources, it's a supplement. | |
Re: > ITS GIVING ME ERROR AS error: too few arguments to function ‘strnlen’ [strnlen()](http://linux.about.com/library/cmd/blcmdl3_strnlen.htm) [strlen()](http://linux.about.com/library/cmd/blcmdl3_strlen.htm) Small but significant differences. | |
Re: > Microsoft has implemented almost everything in the standard. Aroo? I'd say they've implemented almost everything "easy" in the standard, plus partial concurrency. Variadic templates, constexpr, defaulted/deleted functions, and initializer lists are glaring pain points in VC11 that GCC has. The library is thankfully full featured in VC11, relative to … | |
Re: > i think d code is wrong Can you be more specific? :rolleyes: | |
Re: .NET programs aren't compiled to machine code as part of the assembly, they're in an intermediate state (IL assembly language) that the framework needs to compile into machine code. On the first run of an assembly, the just-in-time ([JIT](http://msdn.microsoft.com/en-us/library/8t3521k6(v=vs.90).aspx)) compiler does all of that, which is why it's slower than … | |
Re: > As far as what the requirements are: a good candidate is an expert in their field That's not a requirement, though active members who meet the other requirements have a very strong tendency to also be experts who give excellent help rather than receive it. As an example, we … | |
Re: I'm unable to update our production server, so at the very least we'll need to wait until Dani wakes up. But it looks like there was test code in recent changes that fell through the cracks and needs to be rolled back. It should be a quick fix if that's … | |
Re: > you can use gotoxy() function to draw output gotoxy() isn't widely implemented by compilers. You're essentially assuming that the OP is using Turbo C, which isn't a safe assumption. | |
Re: > Thank you! I'm feeling so stupid... 17 years programming C and I still make that particular mistake (ie. using = instead of ==). No worries, it's a common and easy one to make. ;) | |
Re: I'd wager most of our article level scripting will fail to work, given the suspected cause of the problem. It should be a quick fix, but we need to wait for Dani as she's the gatekeeper for the production server. ;) | |
Re: > and i wonder if you can do it. :-) For a "poor man's" suffix array, I can do it easily: #include <stdio.h> #include <stdlib.h> #include <string.h> static size_t *generate_suffix_array(const char *src) { size_t len = strlen(src); size_t *sa = (size_t*)malloc(len * sizeof *sa); if (sa) { /* Generate unsorted … | |
Re: Your question doesn't make much sense to me. Both versions would be configured to point to a database, so you could easily tell the new version to point to an existing database. The only problems that might arise are changes in the database schema in the new version. In that … | |
Re: Sadly, I'm unable to touch the production server in an administrative capacity. But looking at recent code changes, it looks like the fix will be as simple as a file rollback from version control. | |
Re: I see a possible issue in recent code changes, but until Dani wakes up we can't confirm it or update production. Just sit tight for maybe another hour and things should be resolved. | |
Re: You can get a list of exported functions (the name specifically), but not the full signature; that information is lost during compilation. | |
Re: You've been using Windows 7 with only 1GB of ram? Yes, you'll see a marked improvement by adding another gig. | |
Re: Dual core is the general term for processors with two independent CPUs. Core 2 Duo is Intel's brand name for one of their dual core processors. It's akin to the difference between a compact car and a Honda Civic. | |
Re: There's nothing wrong with your usage of INPUT::mi, and Visual Studio compiles it just fine (barring an unrelated warning about a narrowing conversion). What OS are you using? If it's Windows 2000 or later (highly likely) then perhaps there's a setting in NetBeans that's restricting features of the Win32 API. … | |
Re: > What is the best game you played so far in your entire life? What's the criteria for "best"? I'd probably list games that I come back to on the regular and still find fun or engaging for long periods. These come to mind immediately: * Everquest II * Elder … | |
Re: Can you post a super simple test program that exhibits the problem? Just set an int64_t value and write it to file, then post up that program so others can attempt to reproduce the issue. Also, what compiler and OS? :) | |
Re: Or you can just type the full URL and we'll linkify it automagically as can be seen in the OP of this thread. :D | |
Re: Constness of a member function only applies to the direct state of the object for its class, so it's completely irrelevant if the non-const `hello` calls a member function that changes its own state and not the state of `hi`. It would be different altogether if you tried to change … | |
Re: > My program which is able to calculate your age, has been updated! No offense intended, and not to diminish the effort you put into writing it, but your program isn't so interesting or clever that anybody would care about updates. | |
Re: I'm guessing you want a form that runs before the main form, but you still want to defer the application thread to the main forum? There are a few ways to do that; one of the simpler ones can be seen in a service configuration utility I wrote that looks … | |
Re: We won't help you cheat, but we'll be happy to help you write your own program by answering any *specific* questions you have. Please read our [rules](http://www.daniweb.com/community/rules). | |
Re: Equal ages to *what*? Do you want groups of employees where each group has the same age? Do you want all employees matching a specified age? You can't write a query with vague terms. | |
Re: > And i will suggest to use switch case statement for more fast functioning . . *Potential* for "more fast functioning". Switch statements are generally implemented as a lookup table, but there are possible degenerate cases that can affect performance and the suitability of a switch over an if chain: … | |
Re: > I answered my own thread and marked the thread as solved but it gave another user (which really didnt help at all) the "solved post". *Everyone* who replied prior to the thread being marked as solved gets credit for participating in a solved thread. We're aware that unhelpful people … ![]() | |
Re: What have you done so far? If you haven't written any code, what thoughts have you come up for solving the problem? Did you test any ideas with a small test program? If you haven't done *anything*, why not? Keep in mind that nobody here will do your homework for … | |
Re: > Can anyone please tell me if there are any other brands of microprocessors, demo-boards, or IDEs that allow programming in assembly? Um...all of them? | |
Re: > i dont want any more negative votes to my code. Your snippet has only one vote. Did you post the code to help others or did you post the code to get an ego boost? Seriously, if you're afraid of negative feedback then you shouldn't put your stuff up … | |
Re: > what magic exactly const is doing in the second case ? I think a better question is how would having a non-const reference to a literal value work? A non-const reference basically says "I'm referring to an object with an address whose value can be modified". A literal value … | |
![]() | Re: Start by writing a function that will replace words in a string and use a small program to test it in the absence of user input. Your program can be broken down into smaller subproblems that are easier to solve and less overwhelming. ![]() |
Re: > I Just wanna know what happens if we try to do the following in C++: "abc"+'d' In that particular case, you'd overrun the "abc" array by indexing it beyond the null character at the end. However, whether this is a problem or not depends on how you use the … | |
Re: > I don't know what to properly call a system like that, but on the surface it seems like a simple problem. I'd call such a system "stupid". If the client needs to make changes to or retrieve data on the server side, it should send a request to the … | |
Re: At a glance, the following line is wrong: if(op.topnum=='*'||op.topnum=='/') topnum will never likely be either `'*'` or `'/'`, it's a public alias for top, which is an index rather than a value. Unless the expression is rather large, this condition will never evaluate to true. | |
Re: > After doing some research I'm confused about why you would use these instead of normal SQL query. Separation of the query and data is a primary method of defending against [SQL injection attacks](http://en.wikipedia.org/wiki/SQL_injection#Parameterized_statements). There are other reasons for using prepared statements, but since your concern is security, that's basically … ![]() | |
Re: > could u can plzzz,,,,,,,,,,,...... No. Do your own damn homework, and if you have a specific question or difficulty that doesn't amount to "I'm lazy, gimme gimme gimme", we'll be happy to assist. | |
Re: I'll echo Davey and say that there are no such plans that I'm aware of. On top of video tutorials being largely useless for programmers (in my opinion) unless they're very pointed demonstrations of tools or more of a computer sciencey lecture, it would also introduce the technical issue of … | |
Re: > I don't why I am asking this maybe to gain your opionions... though I am not asking daniweb to change it's colors... but aside from DANIWEB being purple what other color should be it's theme color? At one point several years ago each forum category had its own color, … ![]() | |
Re: > The standard for c++ says that main must look like one of these three options. Or equivalent, to account for different names and things like typedef. The following is still strictly conforming: typedef int foo; typedef char *bar; foo main(foo shizzle, bar *nizzle); The C-style way of defining main … | |
Re: Here's a C++ program: #include <iostream> int main() { std::cout<<"Hello, world!\n"; } | |
Re: I'm guessing you didn't read any of the [stickies](http://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream), given that one of them addresses your exact problem. | |
Re: There's nothing wrong with your code, but use of <iostream.h> suggests an old compiler that may not respect the standard language. What compiler are you using? | |
Re: > But its case sensitive and i want to search case insensitive word. Can someone guide me plz? When you want a character comparison that's case insensitive, you can convert both characters to either upper or lower case. For example: #include <cctype> // For toupper/tolower ... if (tolower(str[i]) == tolower(find[0])) … | |
Re: The quality of your speakers will affect the sound, obviously. In my experience, any speakers built into a monitor are best disabled as they suck many asses. | |
Re: > Can u help me? Yes. |
The End.