5,237 Posted Topics
Re: I think it's just this. [url]http://msdn.microsoft.com/en-us/library/ms713416.aspx[/url] But the execution address and the read address being the same seems kinda odd to me. If that really is the case, then the code took a flying jump off a cliff (typically, following an uninitialised function pointer). The "stack" at that point is … | |
Re: Which compiler allows the nonsense "unsigned long double" as a declaration? | |
Re: [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376[/url] Then decide whether you're compiling C or C++, rather than just whatever happens to compile as you think of it. Also replace the 'goto' with a suitable while loop. Oh, and also learn about code indentation. [url]http://en.wikipedia.org/wiki/Indent_style[/url] | |
Re: > Remember to include a function that displays your name and email address. If I put "George W Bush" and [email]president@whitehouse.gov[/email], would you be smart enough to change it before handing it in? > if anyone can pull this off that would be greatly appreciated Pretty much everyone except you … | |
Re: 'ls' and 'tail' | |
Re: Do a web search for "CSV file format". It's a nice simple text-only format file which is very easy to create, and which excel can readily import. | |
![]() | Re: > I don't really see the point in initializing this variable in the switch How can you say that when you can't see the rest of the code? If that variable is used only in that case of that switch statement, then Narue's answer is spot on. |
Re: Consider instead... - using opendir() to open a directory - using readdir() in a loop to get each directory entry -- using stat() on each entry to get the permissions -- evaluate those permissions as you want - using closedir() when you're done. | |
Re: An array of days perhaps? For each day in a range, add the average to the totalFruitsPerDay array entry which corresponds to that date. | |
Re: > if('\n') What's this supposed to do? > node[(data[j]-1)+num*i].pPtr_word=&node[... > pPtr->pPtr_word=NULL; This won't even compile. > count=count++; Just count++; But since count seems uninitialised at this point, who knows. The code is missing half the { } it needs to make it make sense. And the total lack of indentation … | |
Re: [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351[/url] [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351[/url] | |
Re: Run the code in the debugger, and catch one to examine it in more detail. Possible causes - the string you're copying from isn't "wide" at all, but only looks wide because of dubious casting. - the string has no \0, because you either forgot, or didn't leave room for … | |
Re: Spend a few weeks practicing with [URL="http://web.cs.mun.ca/~rod/ncurses/ncurses.html"]ncurses [/URL] and drawning text windows, typing in one and echoing responses in the other. Spend a few more weeks practicing network programming with [URL="http://beej.us/guide/bgnet/"]beej[/URL] to the point where you can send and receive messages (to yourself). Then you might have a go at … | |
| |
Re: > but don't want to reinvent realloc just because it doesn't work on <reallyoldcompiler>. Care to post an example of that which "doesn't work". Because realloc is a tricky function, and odds are that it's your code that screwed up. Oh, and there's absolutely no guarantee that the memory will … | |
Re: First step would be to learn the difference between = and == when comparing stuff. | |
Re: Sure, but you're going to have to write quite a lot of software to do it. | |
Re: Sure, there are plenty of people here who can help with that. | |
Re: What's your definition of "simple"? Or put it another way, what have you been studying for the past few weeks or months, and how much attention were you paying? | |
Re: Apart from removing using namespace std; from the header file (that's a really bad idea), what do you want? It seems fairly simple as it is. Perhaps consider a .cpp file to go with that .h, and put all the implementation code into the .cpp file? | |
Re: [url]http://en.wikipedia.org/wiki/Central_Board_of_Secondary_Education[/url] Ah yes, the bunch of xxxxx who insist on teaching "c" using a compiler which became obsolete a full 20 YEARS ago. It's not like there's a shortage of high quality, free and most importantly up to date compilers to choose from. This is why I don't worry about … | |
Re: Maybe get a compiler which is compatible with your OS? Basically, you've been lucky up until now that your fossil compiler worked at all on your shiny new OS. Now that you've discovered there are limits, either learn to live with them or move on up into the real world. | |
Re: [url]http://www.catb.org/~esr/faqs/smart-questions.html#bespecific[/url] Better swing by this one a few more times, until you get it [url]http://www.daniweb.com/forums/announcement8-3.html[/url] | |
Re: There doesn't seem to be anything wrong, so it's most likely somewhere else in your code. You could try breakpoint in the dtor, and check that _number_of_dev is what you expect. Oh, and by the way, names beginning with _ are reserved (with few exceptions). Memory corruption problems have a … | |
Re: [url]http://en.wikipedia.org/wiki/Mode_13h[/url] Follow the links at the end. | |
Re: Just call mul several times in a row. | |
Re: Your question is neither interesting, nor urgent. Just your run of the mill student homework, of which many examples can be found around these parts. [url]http://www.catb.org/~esr/faqs/smart-questions.html#homework[/url] [url]http://www.catb.org/~esr/faqs/smart-questions.html#urgent[/url] And while we're at it, you tripped over this in your rush to post [url]http://www.daniweb.com/forums/announcement9-2.html[/url] | |
![]() | Re: Set your app to listen to 127.0.0.1:888 Your filter then connects to 127.0.0.1:888 and itself listens on port 888 of the machine itself. Your filter now sees all the traffic on that port, and can forward/modify/drop as necessary. |
| |
Re: Well you do use eof() in a control loop, which is bad [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351[/url] eof() is a state (the result of a past failure), not a prediction (of a future failure). That is, if you have a 10 char file and read 10 chars, then eof() will NOT be true. It's … | |
Re: > .i know i should make a loop inside but im very weak in programming You'd better be a demon cryptographer then. Without one or the other, this seems a hard problem. | |
Re: You don't reset fac to 1 each time around. If you print it out, you'll see. | |
Re: Put the thing in quotes 1,"hello, world",2 would be 3 columns. Use excel to save a simple csv format file with a field containing a comma. | |
Re: > which is usually at the lower part of the memory to prevent stack overflow from overwriting it. And where stacks grow downwards, that would be a problem right? C doesn't actually require a "stack", only some memory which exhibits the property of allowing scoping. Since many machines have a … | |
Re: No - CPUs know nothing about ASCII. Nor do CPU's have "built-in" functions for anything, unless you count "multiply" as a built-in function. Nor are they capable of "drawing" anything. Neither do operating systems. | |
Re: So which ops are confusing you? addition, multiply? You should at least be able to string a few instructions together to attempt one of the expressions. | |
Re: [URL="http://www.imdb.com/title/tt0062622/quotes"]Another Dave having trouble with the machinery[/URL] | |
Re: > If you want to know what God thinks of money, just look at the scumbags he gives it to. Indeed, when was the last time you saw a poor and destitute religious leader? Sure, most of them will claim that it isn't theirs, but they sure bask in the … | |
Re: Excellent first post - code tags, environment, statement of problem and example code. Everyone else should learn from this! > strcyp (input1, default1); Does this compile? Isn't it supposed to be strcpy() ? > the program will ignore (or seem to ignore) all of my "cin.ignore(1000, '\n');" and > "cin.getline(input1, … | |
Re: [smart questions](http://www.catb.org/~esr/faqs/smart-questions.html#bespecific) I'll leave you to figure out the number of places where [code] tags are mentioned, and as to why you failed to read (or heed) any of them. | |
Re: > is this loop tends to infinity for any value of i and j Like any pair of positive numbers? | |
Re: Do the files still exist somewhere with the original dates? Because it's entirely possible to just get a list of filenames and dates from the old system, then update the dates of those same files on the new system. | |
Re: To add to what skatamatic skatamatic said. The leak report also prints out a {nnnnn} number, which is the number of the block allocated. There is a variable in crtdbg.h which you can set to this number the next time you run the program (in the debugger). When that block … | |
Re: Just print it out in reverse? Or reverse it "in place" in the string it's stored in, then print it out? | |
Re: You should be set if you create a win32 GUI project. | |
Re: Another question is which OS is in between you and the hardware. |
The End.