3,183 Posted Topics
Re: Use File.Copy(), it can recognize mapped drives as well as UNC paths. | |
Re: > but I'm nub sooo, what is compiler flag? It's an option added to the command line invokation of the compiler. Right now you're probably only using something like this: $ g++ myprogram.cpp But you can add a huge number of options in the form of flags. For example, to … | |
Re: public uint[] BIG_Hash { get; set; } ... obj.BIG_Hash = new uint[5]; // set uint[] temp = obj.BIG_Hash; // get The size is an attribute of the actual attached to the underlying object, not the object reference. | |
Re: > i use clrscr(); to clear the screen but anyone knows how to clear the screen in any particular area If you need that kind of control you should be using a console graphics library, or better yet, a full graphical application rather than the console. | |
Re: > So can anyone tell that is he wrong or i am wrong ? You're wrong. The "command" is a Linux program that when run will send SIGKILL to the given process, which basically cannot be ignored. Your teacher clearly wanted you to use "commands" provided by the system, not … | |
Re: > by the way, The code works for Turbo C, it doesn't work for gcc. Which should be your first hint that the code is wrong. If it were right, all compilers would produce the same result. > I think the answer to the question is that scanf is not … | |
Re: > 1) Questions you frequently ask people/expect people to know? I like to ask questions based on real world challenges I've encountered within the target domain. I absolutely despise the tricky questions, riddles, and Google/Microsoft questions that have been all the rage lately. I also don't believe in just testing … | |
Re: I'm getting mixed signals here. What *are* you looking for? ;) | |
Re: Do you have a more specific question? I'm not keen on writing an exception handling tutorial. | |
Re: > You're effectively checking that a is equal to b and a is equal to c. You mean checking if a is equal to b is equal to c. Or in other words, if `a == b` and `c == 1` or `a != b` and `c == 0`. The … | |
| |
Re: > as you see isnt there a way like this or a function to do this ? The comparison operator doesn't work for arrays. Use a loop and write your own function: int compare_array(int a[5], int b[5]) { for (int i = 0; i < 5; ++i) { if (a[i] … | |
Re: > why it doesn't hold for C++? I'd suspect that the person who wrote that was thinking of C++'s RTTI (runtime type information) features. That really has nothing to do with the sizeof operator though. | |
Re: We use a third party library to linkify URLs, and it doesn't handle URLs with embedded parentheses. Handling parens is actually rather tricky because you have to consider parens that aren't part of a URL (like ([www.google.com](http://www.google.com))). We'd also need to integrate the change into Markdown and the editor highlighting … | |
Re: > thank you so much I hope you're not expecting someone to just give you the code. Even if you provided sufficient requirements to write these functions, doing so is against Daniweb's rules because you've show no effort in doing the work yourself. | |
Re: You don't need Office to access the provider, just the redistributable. | |
Re: Arrays are an aggregate type, you can't simply use the assignment operator. Copying is performed with the strcpy() function. argv[1] is also a string, so \*argv[1] evaluates to a single character. I suspect you meant this: strcpy(target, argv[1]); | |
Re: > my interst is C only. If you only care about C right now then I'd suggest reading the [standard](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) and attempting to implement parts of the standard library. On top of learning how to properly use the library by writing it, you'll also learn a lot about computer science … | |
Re: Would it be in appropriate for me to ask if you could send the problematic image to me through email? That's easier than playing 20 questions until I can find one of my own that matches what you have and reproduces the issue. ;) | |
Re: It places a value on the top of the stack. The equivalent would be: ; push [arg] sub esp, 4 mov esp, [arg] Conversely, pop will do the opposite: ; pop [arg] mov [arg], esp add esp, 4 | |
Re: > it is request to you that if i again by mistake post any thread at wrong place(as i will try my best not to do it now), then simply re-place it rather than again giving 2 points. at the end, it's your wish. Everybody follows the same rules and … | |
Re: > By invitation only :) Though there *is* at least one precedent where someone has asked to join the moderation team and that started the process. | |
Re: > what exactly hhx is doing ? i have listend and used hx only and x. but what is hhx in the above code ? hh is a new length specifier beginning with C99. It means that the object is the size of a signed or unsigned char being used … | |
Re: The error isn't unclear or ambiguous. `width` doesn't have a predictable value when you try to use it. You probably wanted another input request to fill it in just like length: #include <iostream> #include <cmath> using namespace std; int main() { float length; float width; float area; cout << "Enter … | |
Re: A good trick for avoiding this type of mistake is taking the size of the destination pointer rather than hardcoding the type: int **m = malloc(5 * sizeof *m); ... m[i] = malloc(5 * sizeof *m[i]); This works because sizeof doesn't actually perform the dereference, it just evaluates to the … | |
Re: > If the question is unclear to you, please let me know. The point of this exercise is unclear to me. Is it just random homework from a teacher who thinks trivia will somehow make you a better programmer? Or do you have an actual real world need? | |
Re: Can you post the implementation for Index2Pointer? That should be sufficient to write a test program. | |
Re: This is wrong: char *string; printf("Enter a string of integers: "); scanf("%s", &string); There are four bugs here, and one of them is fatal. The fatal bug is that you're assuming an uninitialized pointer somehow points to infinite memory. Pointers *must* point to memory that your process owns, either by … | |
Re: I'd say start by getting a simple barcode font, such as IDAutomation's [free 3 of 9 font](http://www.idautomation.com/fonts/free/) and creating some images. The 3 of 9 symbology is dead simple to encode and decode (it's really just a string with asterisk delimiters), which makes it a good symbology to get your … | |
Re: Question: Why are you copying bytes manually rather than using File.Copy()? | |
Re: > So is there any reason to use Windows Forms over WPF ? Backward compatibility comes to mind. WPF was only added in .NET 3.0, and many of us still maintain "legacy" .NET applications (I still have a few targeting 1.1) or specifically target 2.0 for maximum portability. Lack of … | |
Re: > Well, in that case, just use textboxes and do ALL the validation you want in your code. On a somewhat related note, most (perhaps all) of my clients who are keyboard oriented for speed will have needs beyond basic dates as well, which makes textual input for the usual … | |
Re: > These days all implementations ought to be compatible with the C standard. That's where it gets tricky. There are four versions of the C standard at present: 1. **C90**: The first official standard from ISO in 1990. All relatively modern compilers claiming to be C compilers should (and will … | |
Re: > try it by using 0x%02x instead of %00x > You can also use 0x%x. printf() supports an alternate formatting flag that will prefix 0x or 0X for you: printf("%#02x ", array[i]); | |
Re: Are we talking about manipulating clipboard data or catching command line signals (though I'm not familiar with ctrl+v as a signal)? | |
Re: Oracle is still widely used. Four of my biggest clients use Oracle as their back-end, and not knowing Oracle or SQL for Oracle would have lost me those accounts. > And also is this job called Database Developer? That might be one job title, sure. | |
Re: > Why is there so little support for plain C++ on linux though? :S I find it funny that you complain about lack of C++ "support" by the POSIX libraries, then turn around and compare it to the Win32 API (itself a C interface). What makes you think that FindFirstFile()/FindNextFile() … | |
Re: > what happents when we say int frequenct[frequencysize] = {} . does it do a thing or if it doesent why should the writer put that bracket open and bracket close Read the comment for that line. It says "initialize frequency counters to 0". That should give you a hint … | |
Re: It looks like the HTML entities weren't properly converted for display. | |
Re: > Does anyone know tutorials for link list to be able insert,delete,cout list,give id and time ID and time look to be node values, which are trivial to retrieve once you have a node reference. Since you asked for a tutorial, I'll give you a [tutorial](http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_linklist.aspx). :) | |
Re: Assuming the ISP really is the problem (I find that difficult to believe for YouTube), get another ISP. | |
Re: > wrong d=25 is not prime! How is it wrong? The program doesn't say that 25 is prime. | |
Re: You *can*, but my immediate question is why do you want to do so? There has to be a purpose for any level of indirection, otherwise it's just pointless complexity. | |
Re: How about using a message box with the Yes/No buttons option? switch (MessageBox.Show(prompt, caption, MessageBoxButtons.YesNo)) { case DialogResult.Yes: // Do something for yes break; case DialogResult.No: // Do something for no break; } | |
Re: > It does -- all pointers have the same size. Between object pointers an function pointers, all bets are off. But even for different pointers to object types it's not guaranteed that the sizes are the same. Though you've very likely only worked with systems where pointer size matches the … | |
Re: Do some research on virtual memory and paging. The answer is that active pages will use RAM while inactive pages will be moved to hard disk space until needed. Provided there's sufficient hard disk space to hold the inactive pages, the OS will behave as if there's infinite memory (at … | |
Re: > so I was wondering if me learning the win32 api is a waste of time and I should use some of the mentioned libraries for developing windows applications ??? No and yes, respectively. While you should prefer higher level GUI libraries for various reasons, it's still a good idea … | |
Re: Introduction to Algorithms by Cormen, Leiserson, and Rivest is a good start. They use pseudocode for the implementation details. | |
Re: Mask just the low byte after shifting and you'll get what you want: int red = (p >> 16) & 0xff; int green = (p >> 8) & 0xff; int blue = p & 0xff; Coincidentally, I did this very thing *today* while writing an image skew detection algorithm. | |
Re: You'd get better results just posting your music on YouTube. |
The End.