1,118 Posted Topics
Re: [B]invisal[/B] In C and C++ the single character '\n' is considered a 'newline' because it is automatically translated to the appropriate sequence when handling text files. On DOS/Windows, the '\n' is translated to/from '\r\n'. On a Mac, the '\n' is translated to/from '\r'. On Unix, no translation is necessary. The … | |
Re: The [I]easiest[/I] way to compare two strings depends entirely upon your assembler. Chances are though that you might do just as well to write it yourself. First you need to have a good 80x86 assembly opcode reference. [URL="http://library.n0i.net/hardware/i8086opcodes/"]Here's a good one I found on Google[/URL]. I recommend you check out … | |
Re: Whenever programming in assembly you should have at least one very good resource for documentation. Google helps too. [URL="http://spike.scu.edu.au/~barry/interrupts.html"]Some common INT 21h documentation[/URL]. The documentation indicates that function 19h returns the drive number in AL as an integer. You can print it after converting it to an ASCII character. [code=asm] … | |
Re: You want the user to be able to [B]buy[/B] items. (You accidentally misspelled that.) Your best bet is to use one of the STL collection classes with a base item type. That is, create an abstract class for your items, and derive specific items from it. Then use something like … | |
Re: Python deals only with the Gregorian calendar. Certain terms (like "Julian") can be properly applied to specific things withing the Gregorian system, but the Julian calendar it is not. Usually the Proleptic Gregorian calendar serves well enough for modern computing tasks... Try googling "gregorian julian" for conversion algorithms. Good luck. | |
Re: MIPS is specifically designed to have as few instructions as possible/reasonable. Therefore, there aren't any string opcodes. You'll have to do it char by char. Sorry. | |
Re: I always take it a step farther and just tell people to forget the code. Get out the paper and crayons [I]first[/I], draw what must happen, [I]then[/I] write the code to do exactly that. Disentangling new programmers from bad code is more difficult and confusing than just going through the … | |
Re: Line 19 should read [inlinecode]newp = (nameval_t *) malloc( sizeof( nameval_t ) );[/inlinecode] This is why I recommend just [I]always[/I] using parentheses with [B]sizeof[/B]. It always works with parens, but makes a difference without... | |
Re: Shifting only works for powers of two. In any case, it is a substitute for what is actually happening: you are dividing by the radix. So, to get the tens place from a decimal number, you must first divide by ten, then get the remainder of another division by ten. … | |
Re: To be honest, I didn't want to look too hard at this (and I haven't) just because you didn't put your code in the proper tags. [B][[I][/I]code=Delphi[I][/I]][/B] program hello; begin writeln( 'Hello, world!' ) end. [B][[I][/I]/code[I][/I]][/B] becomes all nice and pretty, easy to read, and easy to select, copy, and … | |
Re: Are you saying that you have Mozilla as your default browser but specific web pages load IE to display popups? That's disturbing. Go to [URL="https://bugzilla.mozilla.org/"]Bugzilla[/URL] and post links to the pages that are doing that. | |
Re: You can't do that without very carefully doing some really bad things first. Even in the same program, each loop is a separate entity. There is no reason why a loop in one program file should affect a loop in another. If A eventually stops, then it will stop, no … | |
Re: > Hi Hi. > I want to read a pascal file a find a certain word in that file. Many people would like to do that. > Thanks You're welcome. [URL="http://www.catb.org/~esr/faqs/smart-questions.html#explicit"]Link[/URL]. (Show me what you've done to solve your problem and I'll show you some help.) | |
Re: He's still not clear which is which. [B]bis student[/B] At this point, you should copy [B]Narue[/B]'s code into a file, compile it, and run it. Do it for both programs. That's how you will see what does what. | |
Re: Typically you make your application match XP's visual style simply by linking the XP common-controls manifest as a resource for your application. (You must do this if you want theming capabilities either way. Also, it is better to link as a resource than to just have a manifest file in … | |
Re: I haven't used python to do this, but in Windows it is possible to specify the environment table the child is to use. Thus, if the child modifies its environment, it is modifying something that the parent has direct access to. Unless someone beats me to it, let me see … | |
Re: [B][COLOR="Red"]Before you read that link[/COLOR][/B], you should be aware that if you are doing this for an algorithms class the professor expects you to figure this out on your own. It's not that hard. Oh, and he [B][I]will[/I][/B] know if you use one of the algorithms found through that link. … | |
Re: Since you are using C, your file should be named "calculator[B].c[/B]", [I]not[/I] "calculator.cpp". The problem is that you haven't paid any attention to operator precedence. Line 37 tests all the operators as if they had the same precedence. The whole point of RPN is that it makes precedence moot -- … | |
Re: I was going to say that sleep() isn't in section 5 of the manual... heh heh heh :) | |
Re: Python GUI programming is no more or less platform independent than C++ GUI programming. The only difference is the libraries used. If you want to link between Python and C++, you might want to use the same GUI library in both bodies. You can use Tk (Tkinter in python), or … | |
Re: Be careful suggesting something that he doesn't know. [B]Sarehu[/B]'s response is correct: choice of language won't matter so much as long as you are familiar enough with it to do the job. The more high-level the better. (Hence, given your list, C++ and Pascal are both good choices. There is … | |
Re: Google it. [URL="http://www.google.com/search?q=c%2B%2B+enum&afid=5052&s=&search="]c++ enum[/URL] [URL="http://www.google.com/search?hl=en&q=c%2B%2B+string&btnG=Search"]c++ string[/URL] | |
| |
Re: We can help you if you make an effort. How do you expect to accomplish your program goal? As a hint: roman numerals are [I]representations[/I] of numbers; you will want to convert them to integers, perform your operation, and convert the resultant integer back to a roman representation. This suggests … | |
Re: This is the Pascal language subforum. What programming language are you using? And what database are you using? | |
Re: The riched20.dll is just a wrapper for riched32.dll. The rich edit defaults to a limit. Try sending it the following message: [inlinecode]SendMessage(hwnd, EM_EXLIMITTEXT, 0, -1);[/inlinecode] Thereafter it shouldn't have limits. Hope this helps. | |
| |
Re: You are making two errors: 1. The type of Q.Data[n] is a Flight (aka ItemType) --[I]not[/I] a pointer. You cannot assign NULL to a struct. When I tested it, the following compiled correctly: [inlinecode]Q.Data[i].C_TIME = 0;[/inlinecode] (which is what you were complaining about, so I cannot replicate your problem). 2. … | |
Re: [URL="http://www.freebyte.com/programming/cross_platform/#freecrossplatformguiframe"]Free Cross-platform GUI Frameworks[/URL] [URL="http://www.free-soft.org/guitool/"]The GUI Toolkit, Framework Page[/URL] Pick your poison. Others will post here with favorites. | |
Re: For sequential, repetitive tasks, use a loop. | |
Re: All those functions are for dealing with GUI stuff. Linux is an operating system. On top of that sits "X", the GUI. Unless you are a fanatic, you don't want to deal with xlib directly, so you'll have to choose a GUI framework. (I just responded to a similar post … | |
Re: The line [inlinecode]vector<RequestLog> *map;[/inlinecode] creates a [I]pointer to a vector[/I]. Since it is a pointer, no vector yet exists, and any attempt to use it ([inlinecode]map->push_back( foo );[/inlinecode]) will fail. I think what you want is a (vector of (pointer to RequestLog)), which is written: [inlinecode]vector<RequestLog*> map;[/inlinecode] So your code … | |
Re: What do you mean by "include a file"? Are you talking about source code? Or binary data (pictures, music, etc.)? Or just regular text (ASCII, RTF, etc.)? How do you want it to be used at runtime? And what difference does it make whether you include one or the other? … | |
Re: Use function overloading: [code=C++] void LoadFile( std::string filename, std::string key ) { // blah } void LoadFile( std::string filename ) { LoadFile( filename, filename ); } [/code] Have fun! | |
Re: Try [URL="http://en.wikipedia.org/wiki/Poisson_distribution"]Wikipedia[/URL]. Post back with your code and any troubles you have and you'll get more help. Good luck. | |
Re: Assuming EBX isn't clobbered by the function, then yes, it should work. | |
Re: Turbo Vision is an old "window" interface created by Borland before what we consider to be GUI's really came into existence on the PC. Before Win 2.x programs often did pretty graphics using text mode. You can get it from the folks at Free Pascal (as already noted). | |
Re: In assembly? You can (maybe) but is it worth the effort you'll need to write the loader? The OS exists to make complicated things simple. Just use the OS functions. | |
Re: Yes, please, do it the C++ way. I think that you might expect a large number of orders to be stored? In which case a [B]deque[/B] is a better choice than a [B]vector[/B]. And like [B]Salem[/B] indicated, there is no need to create [I]named[/I] variables (order1, order2, etc.), just use … | |
Re: No, you didn't overload it. [inlinecode]L[/inlinecode] is type [inlinecode]Linea[/inlinecode]. [inlinecode]p1[/inlinecode] is type [inlinecode]Point[/inlinecode]. Neither of these classes overload the "+" operator. By the way, [inlinecode]L + p1;[/inlinecode] is read as "sum L and p1 and throw away the result." It should be something like: [inlinecode]L = L + p1;[/inlinecode] or: … | |
![]() | Re: Actually, it might be possible to some degree. VB uses a lot of bytecode and, if I remember right, Microsoft and others have VB decompilers. You'll never get back the absolute original, but if you can find the right decompiler (and can front the cash for it), you should be … ![]() |
Re: You've misread [B]Narue[/B]'s code. You [I]can't[/I] do this with a standalone function. It [I]must[/I] be a member of a class. In the first example, Amethod() was made virtual in the base class (Bird) and overloaded in the descendant class (Pidgeon). Since it is virtual (or [I]dynamic[/I]) when you say [inlinecode]p->Amethod()[/inlinecode] … | |
Re: A DLL is not very different than an EXE. (Both are PE32 files.) The primary difference is how they are expected to be used. (That is by no means the [I]only[/I] significant difference, so you can't just rename your DLLs to EXEs and expect them to work...) You might start … | |
Re: Are you talking about Delphi's ShortDateFormat /ShortTimeFormat /LongDateFormat /LongTimeFormat variables (in SysUtils)? Or are you talking about changing something in the OS? ![]() | |
Re: <cstring> aka <string.h> is [I]not[/I] more recent. It is the [I]old[/I] C string stuff. The only thing that is recent about it is the ability to refer to it as <cstring> instead of <string.h>. | |
Re: Further, depending on your choice of programming language, it is likely you can find free software libraries that will store all your configuration data in a structured text file format, for example: XML or even (gasp!) INI. | |
Re: Use a loop: [code=Delphi] var total: double; cntr: integer; begin total := 0.0; for cntr := 0 to ListBox1.items.count -1 do total := total +strToFloat( ListBox1.items[ cntr ] ); showMessage( 'The total is ' +floatToStr( total ) ) end; [/code] | |
Re: The most recent trend for assembly is on embedded devices (like your cell phone, the thing under the dash in your car, GPS devices, new game systems, etc.) Like [B]Salem[/B] said, it is very specialized. Employers may or may not care if you know their specific machine, but they will … | |
Re: Yeah, I was thinking of Ultimate++ also. If you don't mind writing "open source" there is also [URL="http://trolltech.com/"]Trolltech's Qt[/URL], which I think still comes with a GUI designer. Version 3 had it at least. And there is GNOME's [URL="http://glade.gnome.org/"]Glade[/URL] (GTK+) designer. There is also the [URL="http://www.free-soft.org/guitool/"]The GUI Toolkit, Framework Page[/URL]. … |
The End.