3,183 Posted Topics
Re: Are you using Internet Explorer? I believe Dani is presently looking into a bug with that browser where the result is your error message. | |
Re: [QUOTE=jbennet;1782732]So, Like on Stack Overflow?[/QUOTE] It's a move in that direction, yes. Stack Overflow is all about tags while Daniweb will still be a traditional forum with stronger focus on tags for refined searching. The biggest difference is that you can post directly to Web Development, for example, instead of … ![]() | |
Re: BBCode no longer works for new posts, it's all Markdown based now. As far as making a code block, it's a matter of indentation (at least 4 spaces). Presently the code button only pastes an example into the editor if there's no text selected. To paste actual code, you would … | |
Re: Casting in C says 'treat me like something else at the byte level'. `"10"` is not the same thing as `10` at the byte level, so the cast doesn't do what you want. | |
Re: The difference isn't immediately obvious, but if you hover over the up arrow to get a comment box then the box represents positive rep. If you hover over the down array, it represents negative rep. Once we work out the list of bugs, I think a decent UI change would … | |
Re: [QUOTE=ardav;1780749]Jeez - I didn't realise that you were dropping vBulletin. Is this a custom forum site coded from scratch or is it based on another setup?[/QUOTE] It's completely written from scratch based on Daniweb's specific needs. Of course it follows similar forum behaviors like forums, threads, and posts, so the … | |
Re: The permissions appear to be correct. When the edit box shows up after clicking the Edit Post link there should be a button labeled "Edit Post" next to a reason text box, assuming the post is younger than the editing time limit of 30 minutes. This button is the submit … | |
Re: I've added that to my running list of feature requests. | |
Re: > But i want that button click event must be fired when cursor remains over button for 3 seconds. I would strongly recommend against this approach because it's unconventional and surprising. If an application I used did this, I would stop using it post-haste and look for an alternative. | |
Re: [QUOTE]hello ! well today i got two down votes , i dont think that there is any thing wrong with my post , as we know who add reputation to us , can we know the person who is down voting us , and is there any way to balance … ![]() | |
Re: Can you do any part of it? Because Daniweb's rules state that you can't just post program requirements and expect someone to give you the code. You'll get more help by trying something and then asking specific questions if you have problems. | |
Re: You can build the query string dynamically. It all depends on how the POST data is organized, but assuming everything in $_POST corresponds directly to table column names and values, here's an example: [code] $columns = array(); foreach ($_POST as $key => $value) { $columns[$key] = "'" . mysql_real_escape_string($value) . … | |
Re: An easy way to use variadic template functions is with direct recursion: [code] #include <iostream> using namespace std; void foo() { // Base case for variadic recursion } template<typename T, typename... Args> void foo(T first, const Args... remaining) { // Use the first argument cout << first << endl; // … | |
Re: [url]http://stackoverflow.com/questions/1300718/c-net-convert-systemstring-to-stdstring[/url] | |
Re: [QUOTE]I already know syntacs of OOP in PHP, but I find it kind of hard to start working with it, I can't find some nice and SIMPLE examples of object oriented PHP.[/QUOTE] In my experience you won't find good *and* simple examples. OOP is best suited to larger projects, and … | |
Re: You need to include the algorithm header for std::reverse(). You're also trying to pass an array of strings to reverseString() when it only accepts a single string object. | |
Re: [QUOTE=pritaeas;1770038]Wait for the new version of DW.[/QUOTE] The new version also pages threads and posts, but it couldn't hurt to get some experience with the new design and base suggestions off of that instead of vBulletin, which is going away shortly. :) | |
Re: [url]http://php.net/manual/en/function.get-browser.php[/url] | |
Re: [QUOTE]when I tried to insert element is "weather" queue and display it shows the same element in all the queues declared.[/QUOTE] Yes, that's what you appear to have told it to do: [code] // Insert message and return the resulting queue (I'm assuming) head= weather->enqueue(head,(gcnew message("*144"))); // Display the provided … | |
Re: [QUOTE]well it seems the code will not work in codeblocks.[/QUOTE] They use the same compiler, just different versions... And there's no way to say what you did wrong unless you post the code here. | |
Re: myEventParticipating is null by default and you never set it in the snippets. | |
Re: Modern programming education: where you learn totally useless stuff at the expense of useful stuff. [QUOTE]can i know how to find greatest of two numbers? the condition is we should not use any comparision operators..[/QUOTE] You can easily find the answer to this on google. I can't in good conscience … | |
Re: Yes, it's possible. No, it's not portable. Yes, you need to say what compiler and OS you're using. | |
Re: The default construtor doesn't do anything with the classList pointer, so it's still uninitialized when you call user_Input(). The ideal would be to eschew a dynamic array in favor of a standard vector object, but if you must use a dynamic array, it might be a good idea to ditch … | |
Re: [QUOTE]but this is also showing error[/QUOTE] The code has syntax errors. C is case sensitive, but you use both pData and pdata to mean the same thing. Try this instead: [code] #include <stdio.h> #include <stdlib.h> int main () { int i,n,big; int * pdata; printf ("Amount of numbers to be … | |
Re: [QUOTE]why instead of this why cant we use array???[/QUOTE] And if you don't know the size of the array at compile time? | |
Re: [QUOTE=marases;1768103]Hmm thank you, and yeah like if i have a problem, what steps must i under go to solve it. etc... So its really not important that i know these things?[/QUOTE] It's critical that you know those things. Problem solving is the core of programming after all, but I'm not … | |
Re: The overloaded<< operator only allows non-const references, which excludes temporaries like the ones returned by transpose() or calculated with the overloaded operator*. You should change it to expect a reference to const instead as you don't make any changes to the object's state: [code] ostream &operator<< (ostream &out, Matrix const … | |
Re: [QUOTE]what is the use of -> in c.[/QUOTE] [ICODE]a->b[/ICODE] is equivalent to [ICODE](*a).b[/ICODE]. It's syntactic sugar for accessing members of a structure through a pointer to an instance of the structure. | |
Re: Wow, there are some unsympathetic people here. :icon_rolleyes: If it's legitimate harassment then that's an issue, but to the best of my knowledge there's no way to find out who is doing the voting without direct database queries, if that information is presently stored at all. You'd need to contact … | |
Re: [QUOTE]if the inorder traversal of a binary tree is sorted, then is it necessarily a binary search tree?[/QUOTE] While that exact tree would represent a binary search tree, I'd say that it's not a binary search tree unless the algorithms used to insert and update it maintain that order. Otherwise … | |
Re: [QUOTE=gerard4143;1762685]Maybe you could elaborate on 'this code doesn't execute'.[/QUOTE] I think it's the next evolution of "it doesn't work". :D And the problem is with a call to scanf(): [code] scanf("%d",&x); [/code] Which should be this: [code] scanf(" %c",&x); [/code] Note the leading space in the format string. This forces … | |
Re: [QUOTE]However,it seems that i cant use 'if else' to call them[/QUOTE] Could you elaborate on this? The only real problem with how you're calling the functions is that they don't exist; you've only declared the function signatures, not actually defined the function bodies. | |
Re: [QUOTE]Yes, I did try using a fflush(stdin) between the 2 inputs, still doesn't work.[/QUOTE] You're making the assumption that [ICODE]fflush(stdin)[/ICODE] is clearing the input stream, which isn't a safe assumption. Technically it's undefined behavior to call fflush() on an input stream. As a quick test, replace the [ICODE]fflush(stdin)[/ICODE] line with … | |
Re: The [URL="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf"]draft standard[/URL] will tell you what's legit as far as C++ goes. The competition might have another definition of "standard" though. | |
Re: [QUOTE][CODE] cout << "please enter your first and last name" << endl; cin >> name;[/CODE][/QUOTE] That is your problem, and this is the fix: [code] cout << "please enter your first and last name" << endl; getline(cin, name); [/code] The reason it's the problem is operator>>() stops reading at whitespace. … | |
Re: Why do you need a 2D array if you already have a class holding the data? [code] personClass[] people = new personClass[N]; for (int i = 0; i < N; i++) { people[i] = new personClass(); people[i].Name = "John Doe"; people[i].Address = "123 Nowhere Lane"; people[i].Phone = "(555) 555-5555"; people[i].PostCode … | |
Re: [QUOTE]The C standards indicate that "char" may either be a "signed char" or "unsigned char".[/QUOTE] Yes. [QUOTE]That said, if it's being used to hold a value between 0 and 255 it doesn't matter what it is - all char values can hold at least 256 different values; you just need … | |
Re: The only problem I see is processing the # wildcard. Other than that it's a simple matter of grabbing a word from both the pattern and the source string, then either checking them for equality or not depending on if the pattern word is a * wildcard. Processing a # … | |
Re: For a rotating cipher you would reverse the operation to decrypt. So add 3 for encryption and subtract 3 for decryption: [code] #include <iostream> #include <string> using namespace std; string Encrypt(string const& s) { string result; for (int i = 0; i < s.size(); i++) { result.push_back(s[i] + 3); } … | |
Re: [url]http://codeigniter.com/user_guide/general/urls.html[/url] [url]http://codeigniter.com/wiki/mod_rewrite[/url] | |
Re: [QUOTE]so, info is a Information struct[/QUOTE] Those two lines are only meaningful if info is a pointer to an Information object. [QUOTE]is there any different between the two shown above?[/QUOTE] Nope, the arrow operator is for convenience when dereferencing a pointer member. [QUOTE]and what is "->" and "." called?[/QUOTE] They're … | |
Re: [QUOTE]Some folks really believe in DataSets, DataAdapters and DataTables.[/QUOTE] The implication being that you think they're not a good solution? If so, please explain why. I always enjoy hearing different perspectives. :) | |
![]() | Re: By auto parse do you mean turn a URL into a clickable link? Starting off in the new system there will be only one editor, and we're moving from BBCode to Markdown for formatting purposes. I doubt that's going to change this close to release, so I feel comfortable stating … ![]() |
Re: [QUOTE]but when i build i still get the error message[/QUOTE] What's "the error message"? If you mean when you *run* the program you get the error opening file message, then I'd suggest using perror() to get more details: [code] if (infile.fail()) { perror("Error opening file!!! Now closing program!!!"); exit(1); } … | |
Re: Endianness only matters when you make an assumption about how bytes are organized. Bitwise operators will work with the value and have consistent behavior regardless of the endianness of the system, and that's one way to ensure portable code when sending or receiving binary data: [code] #include <algorithm> #include <iostream> … | |
Re: [QUOTE=Esmerelda;1763571][code] #include<stdio.h> main() { int a=1; switch(a) { case isdigit('1'):printf("Hello"); } }[/code] This code works fine Hello is printed [code] #include<stdio.h> main() { int a=1; switch(a) { case isalpha('a'):printf("Hello"); } }[/code] But this code gives an error It says case label does not reduce to an integer[/QUOTE] It doesn't reduce … | |
Re: [QUOTE]can I be assured that every guest who visits the site has a unique session id?[/QUOTE] No, though the likelihood of a collision is rather low. [QUOTE]and for example I use a rand() to generate and store a $_SESSION['customer_id'] can I be assured that every set of rand() is also … | |
Re: Return from the function with a return statement and the program will continue to run from that point on. But if the program depends on results from the function that errored, you'll have problems later on. |
The End.