1,118 Posted Topics
| |
Re: You've actually hit on the right idea. You've just made a couple of simple mistakes. Firstly, you have a full point object [code=Pascal] TYPE point = RECORD x: real; { This is the abscissa } y: real; { This is the ordinate } END; [/code] Remember, the word "abscissa" means … | |
Re: The fact that that works is fluke. What is the pixel format for your image? (pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit, something else?) If it is pf24bit then every three bytes are a tuple (blue, green, red) --in that order. If you need to learn more about the different … | |
Re: You may be trying to allocate too large a chunk of memory at once. Have you considered using an STL std::deque, or a std::list (or other linked list)? Is it absolutely necessary to load the entire list at once? I presume you are doing some post-processing on the lidar data … | |
Re: No, you've completely missed the concept of argv. argv is an array of strings (where a string is a pointer to char). It is not safe to change argv. argc is the number of items in the argv array. argv[0] is the program name. argv[1] is the first argument. etc. … | |
Re: I don't have Vista, so I can't exactly identify what part of the OS is giving you the problem. IDLE uses a feedback loop socket. This is a weird thing to do, so antivirus and internet access filters (like ZoneAlarm and the like) complain. Vista has a lot of protocol … | |
Re: For option number two, google Resource Hacker. That'll do it. | |
Re: What you want isn't technically "security related issues" but "[URL="http://en.wikipedia.org/wiki/Copy_protection"]copy protection[/URL]" issues. The link lists various copy restriction schemes. You can always [URL="http://effbot.org/zone/python-compile.htm"]compile your python code[/URL] to a native binary to make it less crackable. Python is an interpreted language, which byte-compiles itself; both factors make it more crackable than … | |
Re: Bluetooth was designed as a C and C++ API, but you can use the Windows Sockets interface directly to make a Bluetooth application. (People also sell components you can use with Delphi, but they aren't cheap.) You might want to check out these MSDN articles: [URL="http://msdn2.microsoft.com/en-us/library/aa362928(VS.85).aspx"]Bluetooth Programming with Windows Sockets[/URL] … | |
Re: It is unlikely that anyone is going to write code for you... However, what you want to do shouldn't be too difficult. Every time you start a new program you just need to add a new menu item to your menustrip at the bottom of the window. Part of the … | |
Re: It looks like an old Turbo variant to me. Did you try [inlinecode]asm move dh, [y][/inlinecode] ? This is just a guess... | |
Re: The first is local data you can edit (since the array is local data). The second is a local pointer to global, static (constant) data. You are not allowed to modify constant data. If you have GNU C, you can compile with [inlinecode]-fwritable-strings[/inlinecode] to keep the global string from being … | |
Re: Well, you can do it the portable way (there is more than one way to do it the portable way; this is only my latest variation for y'all): [code=C++] #include <iostream> #include <limits> namespace console { void pause() { std::cout << "Press ENTER to continue..."; std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' ); } … | |
Re: [URL="http://effbot.org/zone/python-compile.htm"]See here[/URL] for links. Hope this helps. | |
Re: The choice of [B]TListView[/B] is a bit odd to me. You could have just as easily used a [B]TListBox[/B] or [B]TRichEdit[/B] component, which will give you an [B]items: TStrings[/B] or [b]lines: TStrings[/b] property, as well as [B]LoadFromFile[/B] and [B]SaveToFile[/B] methods. You also need to check to make sure the user … | |
Re: You are not properly initializing your fstream. Try: [inlinecode]stfile.open( "fooey.dat", ios::in | ios::out | ios::binary );[/inlinecode] I'm still a bit dubious about what you are doing in your code. (There's nothing wrong with writing an object to file like you are; it's just that your code looks really scattered.) Hope … | |
Re: You have to do some planning on how exactly your messages are to be formatted (more information than just text must be sent). Use an INET, STREAM socket. Avoid datagrams. You will have to have a server running on some system everyone can access, which accepts connections and duplicates information … | |
![]() | Re: Ah, young grasshopper, you have advanced to the next level: you have recognized the need for better [URL="http://www.devx.com/getHelpOn/10MinuteSolution/16975"]input validation[/URL]. It might be worth it to make yourself a little function that reads and returns a validated number. ![]() |
Re: Supply a different .h file to people using the library than the one used to compile it. | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/arrays.html"]Link[/URL]. Even if you are familiar with a language a good reference is invaluable. C++ is so popular that if you google anything alongside "c++" you can usually get good hits also. Hope this helps. | |
Re: There is no button in graphics.py. How exactly are you trying to create one? | |
Re: Check out [URL="http://gnuwin32.sourceforge.net/packages/pdcurses.htm"]pdcurses[/URL]. The other ways to do it would be to use the BIOS console control or the Windows Console API directly. I don't think TurboVision is available for C... | |
Re: [B]RajatC[/B] Please take the time to look up information if you don't recognize something, rather than hijack someone's thread. [B]string::npos[/B] is a STL object used to mean any index at or past the end of a string. [B]anallan[/B] You actually have the right idea, but you made three (small) mistakes. … | |
Re: No. Years. Check out [URL="http://www.daniweb.com/forums/thread4894.html"]this thread.[/URL] | |
Re: I think the original problem (causing the compiler error) is this: [inlinecode]EventStream<complex<Lambda[B][COLOR="Red"]>>[/COLOR][/B] evstrTrain( ...[/inlinecode] C++ compilers can't distinguish this from the right-shift operator. You need to have a space between them: [inlinecode]EventStream<complex<Lambda[B][COLOR="Red"]> >[/COLOR][/B] evstrTrain( ...[/inlinecode] Hope this helps. | |
Re: It is a standard [I]POSIX[/I] function. It is not a standard C/C++ function. [URL="http://en.wikipedia.org/wiki/Fork_%28operating_system%29"]See Wikipedia for more[/URL]. Be sure to click on the first few links down at the bottom in the "See Also" section too. Hope this helps. | |
Re: You haven't really provided enough specific information. What do you mean by "system" and "ping"? You've collected some sort of text packet over some socket into a file? How is the string to be found? Can you search for an exact match? Or would something more flexible be required? In … | |
Re: The problem is you aren't thinking it through: you are trying to use things before they exist. To best help, you need to work on how to convert abstract stuff like "draw a door of a specific width" to the code that actually draws a door. Do like I suggested … | |
Re: You've not given enough information for us to help you. Try setting some breakpoints and/or stepping through your program. When you have identified the section of code causing the problem, post it and we can go from there. | |
Re: You're kidding, right? You demand us to help you in less than two hours? Go get a job and see how long people put up with you. Since you fixed it yourself I won't bother giving you my answer. | |
Re: It would seem that quickreport somehow corrupted your delphi installation. You can try uninstalling quickreport but if it modified something important you may have to completely uninstall and reinstall delphi. Sorry. | |
| |
Re: Yes, it can be done, but [I]I've[/I] never done it... The toplevel window needs to have the -container flag and -use for the window ID of the SDL window. [B][I]However,[/I][/B] PyGame wasn't really designed to coexist with other toolkits. See [URL="http://www.pygame.org/wiki/gui?parent=index#The user perspective"]Why Gtk/Qt/WxWidgets... are bad[/URL]. Hope this helps. | |
Re: [URL="http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html"]Link[/URL]. Pay special attention to the section on "Reading and Writing Complex Data". You are interested in integers, but the same principles apply. Here's their example using [B]int[/B] instead of [B]Data[/B]. [code=C++] #include <fstream.h> ... int x; int *y = new int[10]; fstream myFile ("data.bin", ios::in | ios::out | ios::binary); … | |
Re: I presume you are trying to do X11 tunneling? Is your laptop running *nix or Windows? If Windows, what software are you using to connect? | |
Re: My brain won't read stuff outside of code tags right now... Just set the entire block to zero. You can do it with a nested loop, or just one loop, or just using a library function. [code=C++] #include <cstring> ... char array[7][10]; // seven strings of 10 chars each // … | |
Re: They shouldn't, but sometimes they do. This is because a great deal of optimization is based on heuristic rules, which you can break in quite a number of different ways. According to Microsoft, you should always get your program working and thoroughly tested before enabling optimizations, and then test it … | |
Re: The >> and << file operators only read until it encounters the next non-whitespace object in the file. In your case, it is the word "RECORDS". Your buffer is 1000 characters long, so you cannot read more than 1000 characters at a time. So, try this instead: [code=C++] ... char … | |
Re: Delphi provides you with the Microsoft Help Compiler (at least versions as old as D5 did), but using it directly is not fun. You can google "help file creator" for the right stuff. If you want to make [B]HLP[/B] files, you can always check out [B]Finn Christiansen's Shalom Help Maker[/B], … | |
Re: An array is a static structure, so the compiler must be able to know its size when compiling the code. The size of the file may change, depending on the file, so the compiler says "well, exactly how much space am I to reserve, then?". You say that Size_of_the_file is … | |
Re: OnCreate is a standard Borland idiom for a procedure/method executed whenever a new form is created (or other windows object). So what is your problem? | |
The question frequently comes up on how to manipulate dates and time using Delphi. Delphi 2.0 and later supply the [B]TDateTime[/B] format, which is actually a floating point number (stored as a IEEE double) containing the number of days that have passed since 12 December 1899. (Delphi 1.0 calculated the … | |
Re: Please learn to use code tags. I've already given you a number of examples. In general, the rule is that you must verify user input at every step. Generally with user input this means to always accept strings. This also requires a little ingenuity when deciding how to validate the … | |
Re: It looks like you are grappling with MS crap. Make sure you compile with [inlinecode]/clr[/inlinecode] command option. Enjoy. | |
Re: Google something like "[inlinecode]386 hardware interrupts[/inlinecode]" and just plain "[inlinecode]hardware interrupts[/inlinecode]". Good luck. | |
Re: C++ is a little bit more strict about how it defines NULL than C. The compiler is complaining because you are passing a (void *)0 as the third argument, when it expects an (int)0. Hope this helps. | |
Re: Your string needs to be pretty darn huge before you'll need to play with a progress bar. So, first check the length of the string. If it is less than, say, 3000 characters, don't bother: just use the Replace function as you have it. If it is larger, you'll need … | |
Re: I always tend to stick the main program one directory above all the other modules. My directory tree will look something like this: [code] Gork/ gork.py README ... images/ title.tga player1.tga player2.tga ... modules/ __init__.py gameboard.py globals.py tga32.py widgets.py ... [/code] And so on. Obviously, "gameboard.py", etc. are the modules. … | |
Re: It most certainly does exist, and vs2008 is pretty darn standards-compliant. Be careful about your capitalization. Also, you must include one of the STL headers to see it. Try: [code=C++] #include <iostream> using namespace std; int main() { cout << "Hello world!" << endl; return EXIT_SUCCESS; } [/code] However, you … |
The End.