5,237 Posted Topics
Re: I guess they mean this [url]http://en.wikipedia.org/wiki/Finite_automata[/url] But the question is too weak to give it much attention at all. Even this is pushing it. | |
Re: Load first map from file Play level Load second map from file Play level If loading a map takes a few seconds then Load first map from file Play level Display some static image and play "tension" music in the background Load second map from file Play level | |
Re: > int dataLen = recv(client, recvBuffer, 1024, 0); You're assuming several things (all of which are false, eventually) 1. That for every "message" sent, you get "message". STREAM sockets can fragment the message (only the byte order is guaranteed). So you might get "mess" or even "messagemessageme". 2. That every … | |
Re: [url]http://www.daniweb.com/forums/announcement125-2.html[/url] Here's some questions for you - how are the switches and display wired to the processor? - how are specific elements of the display selected? Perhaps begin with something simple, say incrementing a digit every time a key is pressed. It's not much, but you'll learn a lot, and … | |
Re: Well if you showed us how you declared and initialised your array, then we could tell you how to pass it to a function. Hint: just copy/paste the original declaration into your function prototype. | |
Re: Start with trivial input files, like say 1 2 A B then try 2 3 A B B C Trying to debug with large data files just clouds the issues. Another thing to add (for your own benefit) is a 'dump' function you can call to just print the entire … | |
Re: So why can't you recursively evaluate A -> B -> C ? a1 = eval( eval(a2) + eval(a3) ); When you get to a3, you see that you need to do another eval() Is this a plan? The only problem you need to watch out for is if there is … | |
Re: > while(nextPermutation(elements,n)); But you marked the function as returning void. You need to return a value indicating if there are more permutations. | |
Re: Have you considered the security implications of giving the world and its dog complete and unfettered access to your system? | |
Re: > is this solution correct? Try it yourself perhaps? | |
Re: Tally Ho!, once more into the breach. [url]http://www.daniweb.com/forums/thread160855.html[/url] | |
Re: No, you're wrong. argc is a COUNT of the number of arguments, it has nothing to do with the value of any single argument. All the args are in argv[] as a series of string, which you need to covert. So a long long int would be a string in … | |
Re: Read this, and the other intro threads. [url]http://www.daniweb.com/forums/announcement125-2.html[/url] > i write "hello" and program write "olleh". Try. - printing hello from a string already initialised in your program - printing a string as the user types is (letter for letter) - printing a whole string as entered by the user … | |
Re: Can you post an example in context? A single line "what's this do" means nothing. | |
Re: So run it in the debugger, and find the line of code which actually triggers the memory fault. Don't just post a few lines of code for your "best guess" and ask "what does this look like?" | |
| |
Re: > Why does this happen? Because TCP is a stream protocol. All it guarantees is the order of the information. Breaking that into packets is your problem. You might send "hello world\n" "bye world\n" in two separate send calls but on any given test, you might get "hello world\nbye" " … | |
Re: Because passing an array to a function reduces it to just a pointer to the first element, and the size information is lost. Just like it were a regular function. | |
Re: How can something be 99% complete AND have a major issue at the same time? | |
Re: Some attempt at effort here -> [url]http://www.daniweb.com/forums/thread279658.html[/url] | |
Re: Try thinking for a change, how likely is this still for sale? Original post [B][COLOR="Red"]15th Aug 2008[/COLOR][/B] | |
Re: 400*400 is 160000 This is somewhat larger than the 16 bits (max 32767) that your ancient TurboC compiler can manage. UPGRADE! | |
Re: You could post some ACTUAL code, not 1-line entries out of the API manual. Then there's the spam [url]http://www.daniweb.com/forums/post1203148.html#post1203148[/url] | |
![]() | Re: > but if I call malloc every time, it would be a memory leak wouldn't it? It would actually seem simpler. If rows and cols are variable each time around the loop, then allocate / do stuff / free might be a lot simpler. realloc is for when you're say … ![]() |
Re: > int f = atoi(&from); Simply creating values of the right type isn't enough. You need to know what's going to happen next. atoi() expects an ARRAY of characters ending in a \0 character. This, you do not have. You have a single char and undefined values following it (so … | |
Re: In other words, just another lame-assed pyramid scam that relies on enough muppets to sign up after you so that you can cash in. [attach]14604[/attach] If you can't figure out that that rapidly runs past the population of earth, then you're just too dumb. | |
Re: Arrange to distribute the sensitive information by another channel to known individuals at each client site. | |
Re: [url]http://www.daniweb.com/forums/thread279336.html[/url] | |
Re: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.picturebox.aspx[/url] "Typically the PictureBox is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file." Sure, if you want to do the heavy maths, and bash out all the pixels yourself before rendering it. Perhaps there are better controls? | |
Re: Maybe ask them the question? My eyes are bleeding from straining to read yellow text on a green background - puke puke puke. My guess is one or more sample values jump to one of the sample limits (and pretty much stays there). | |
Re: What about just 'diff' ? Or 'fc' if you're on the dark side. | |
Re: Meh. +1 for managing to use code tags on the first post - that was promising... -1 for posting code lacking any indentation at all. -20 for just dumping a sorry mess of code and not saying a damn word about it. What's wrong with it? What does it do? … | |
Re: What about the declarations of mesh and element? And the associated functions? Plus, remove all the unused variables from main() Edit: Which OS/Compiler are you using? | |
Re: Is any of that relevant to C++? | |
Re: How long does it take to clear the listview control, then repopulate it with 1000 entries? Sorting the original data without all the excess baggage of the control might just be more efficient. Also, are display updates turned off by the control when it does the sorting? Or is it … | |
Re: Have you got as far as typing error messages into google? [url]http://msdn.microsoft.com/en-us/library/ms854226.aspx[/url] | |
Re: A fine coat, made from the skin from the fingers of 1000 spammers. As well as being a somewhat rare commodity, the beneficial side effect is that 100 of them can no longer type :icon_twisted: | |
Re: Most of the IDEs I know save the compilation/interpretation to external tools. So a simple wrapper around - edit file using an editor - pass file to compiler - gather error messages. All of this is mundane stuff compared to writing a compiler. Maybe grab the source code for code::blocks … | |
Re: > I tried using ./configure to install it, but it didn't work. Do you go to a doctor and just say "it hurts" and then expect a cure? Or do you offer up some additional information which might actually help your doctor to figure out what is wrong with you. … | |
Re: > It reduces the likelihood of accidentally using an assignment statement (a = 1) instead of an equality statement (a == 1) Or it increases the likelyhood of making a mistake when you have (var1 == var2), and no amount of rearranging the code will save you. Plus, a lot … | |
Re: What error (we can't see your screen)? Perhaps if you added some error checking code, rather than blindly assuming that success is guaranteed, you might be able to ask a more direct question. | |
Re: Your class is missing a ; after the closing } | |
Re: The same code was round a few days ago, including the same mistakes. My guess is that this is a "fix the errors" homework assignment just dumped on the board. | |
Re: Unless your union has members which are all the same size, you're stuck. When you assign values to your array via the union (for the shorter types), you get a lot of holes in memory which are not filled in. However, when you try to recast that as a pointer … | |
Re: > As for the behavior...Try it and see what happens. Bad idea - they might think it works. @OP if you didn't call malloc(), then DON'T call free(). if you did call malloc(), then call free() exactly once. | |
Re: Compare with the code generated by the compiler? gcc -S prog.c will generate prog.s All that push/pop in the loop is expensive! | |
Re: Nah - that's just refreshing honesty from the mods :) The post itself arrived on the end of some dead thread to begin with (hence the orange cookies). | |
Re: > Can you give me an example. What are you on about (or how helpless are you) [url]http://www.mega-nerd.com/libsndfile/command.html#SFC_CALC_SIGNAL_MAX[/url] There - in large letters for anyone with eyes to see - the word "Example" followed by a snippet of code. | |
Re: > g++ -LD:\Program Files\Lua\5.1\lib -oMacroLua.exe MainLuaTest.o You told the linker where to look, with the -L option. But you also need to say which library you want, with the -l option (that's lower case L). If the library is lib[COLOR="Red"]lua[/COLOR].a for example, you would add -l[COLOR="Red"]lua[/COLOR] to the command line. |
The End.