3,183 Posted Topics

Member Avatar for ail swati
Member Avatar for ail swati
0
149
Member Avatar for Vasthor

> 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 …

Member Avatar for deceptikon
0
194
Member Avatar for complete

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.

Member Avatar for ddanbe
0
544
Member Avatar for addicted

> 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.

Member Avatar for Bob
0
2K
Member Avatar for nitin1

> 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 …

Member Avatar for nitin1
0
116
Member Avatar for prakhs

> 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 …

Member Avatar for prakhs
0
212
Member Avatar for myk45

> 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 …

Member Avatar for aumshah
0
152
Member Avatar for Benchanda
Member Avatar for brylle
0
75
Member Avatar for ome2012

Do you have a more specific question? I'm not keen on writing an exception handling tutorial.

Member Avatar for ome2012
0
203
Member Avatar for orar

> 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 …

Member Avatar for np complete
0
282
Member Avatar for UmerIkhlas

"Management system" is incredibly vague. Can you be more specific?

Member Avatar for deceptikon
0
60
Member Avatar for kshahnazari

> 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] …

Member Avatar for L7Sqr
0
146
Member Avatar for nitin1

> 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.

Member Avatar for myk45
0
269
Member Avatar for TrustyTony

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 …

Member Avatar for deceptikon
0
152
Member Avatar for kshahnazari

> 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.

Member Avatar for deceptikon
0
111
Member Avatar for kothaisaravan
Member Avatar for deceptikon
0
187
Member Avatar for somjit{}

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]);

Member Avatar for somjit{}
0
4K
Member Avatar for nitin1

> 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 …

Member Avatar for Bob
0
172
Member Avatar for lewashby

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. ;)

Member Avatar for nitin1
0
485
Member Avatar for bobejoe
Re: push

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

Member Avatar for Schol-R-LEA
0
99
Member Avatar for nitin1

> 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 …

Member Avatar for nitin1
-2
212
Member Avatar for nitin1

> By invitation only :) Though there *is* at least one precedent where someone has asked to join the moderation team and that started the process.

Member Avatar for nitin1
0
245
Member Avatar for macdunk11

> 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 …

Member Avatar for WaltP
0
270
Member Avatar for ConfusedLearner

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 …

Member Avatar for np complete
0
184
Member Avatar for coding101

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 …

Member Avatar for deceptikon
0
113
Member Avatar for venomxxl

> 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?

Member Avatar for venomxxl
0
121
Member Avatar for IanKent

Can you post the implementation for Index2Pointer? That should be sufficient to write a test program.

Member Avatar for deceptikon
0
121
Member Avatar for BoulderMen

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 …

Member Avatar for WaltP
0
190
Member Avatar for Denden17

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 …

Member Avatar for Denden17
0
116
Member Avatar for ctrl-alt-del
Member Avatar for ctrl-alt-del
0
243
Member Avatar for fRodzet

> 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 …

Member Avatar for fRodzet
0
211
Member Avatar for liliya.tugashkina

> 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 …

Member Avatar for liliya.tugashkina
0
741
Member Avatar for bhavin.chavada

> 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 …

Member Avatar for deceptikon
0
147
Member Avatar for macdunk11

> 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]);

Member Avatar for deceptikon
0
158
Member Avatar for np complete

Are we talking about manipulating clipboard data or catching command line signals (though I'm not familiar with ctrl+v as a signal)?

Member Avatar for WaltP
0
294
Member Avatar for krutatA

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.

Member Avatar for krutatA
0
141
Member Avatar for triumphost

> 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() …

Member Avatar for deceptikon
0
762
Member Avatar for kshahnazari

> 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 …

Member Avatar for NathanOliver
0
179
Member Avatar for TrustyTony

It looks like the HTML entities weren't properly converted for display.

Member Avatar for TrustyTony
0
265
Member Avatar for ccbuilder

> 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). :)

Member Avatar for deceptikon
0
97
Member Avatar for beholdafrica

Assuming the ISP really is the problem (I find that difficult to believe for YouTube), get another ISP.

Member Avatar for johhny-marshal
0
132
Member Avatar for tux4life

> wrong d=25 is not prime! How is it wrong? The program doesn't say that 25 is prime.

Member Avatar for delta_frost
0
795
Member Avatar for rithish

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.

Member Avatar for delta_frost
-1
111
Member Avatar for Dendei

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; }

Member Avatar for ddanbe
0
266
Member Avatar for Suzie999

> 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 …

Member Avatar for deceptikon
0
143
Member Avatar for ishant gaurav

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 …

Member Avatar for deceptikon
0
118
Member Avatar for sss93

> 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 …

Member Avatar for deceptikon
0
240
Member Avatar for semicolon

Introduction to Algorithms by Cormen, Leiserson, and Rivest is a good start. They use pseudocode for the implementation details.

Member Avatar for deceptikon
0
53
Member Avatar for Krokcy

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.

Member Avatar for WaltP
0
203
Member Avatar for nitin1
Member Avatar for deceptikon
0
160

The End.