--------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00002 Date: 01/05/98 From: ADAM MAJER Time: 04:25pm \/To: LEE KIRBY (Read 2 times) Subj: Extra bytes LK> LK>> The way I count, this structure should be only 190 bytes, but if I o LK> LK>> a sizeof( fMsg), it reports 192! LK> > I added it all together, and the structure IS 192. LK>Hmm...I still get 190. I believe the solution is that the compiler allocate LK>a chunk of memory that is divisible by 2 for efficiency's sake. LK> struct header { LK>036 char from[ 36 ]; . . . LK>002 ushort nextReply; LK> }; LK>=== LK>190 If you have paragraph alignments and stuff, then the compier allocates 192 bytes 'cause in binary the numbers are: 190 - 1011 1110 - 0xBE 192 - 1100 0000 - 0xC0 If you divide by 16 bytes (paragraph) you get: 190 - 11.875 <- not an even paragraph 192 - 12 <- even paragraph - faster and easier access --- FMail 0.92 # SLMR 2.1 # Unable to locate Coffee -- Operator Halted! * Origin: The Programmer's Oasis on FIDONET! (1:348/203) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00003 Date: 01/05/98 From: ADAM MAJER Time: 04:25pm \/To: HANS BAKKER (Read 2 times) Subj: I need c++ HB> hmm . . I don't think that people who use it for their hobby are HB> using a legal copy. Only people who use it for their job are using HB> legal copy's . . What?!? I'm using a legal copy just because pirating is fraud. How would you like if someone stole your programs? (Or robbed your house?). --- FMail 0.92 # SLMR 2.1 # It's only a hobby ... only a hobby ... only a * Origin: The Programmer's Oasis on FIDONET! (1:348/203) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00004 Date: 01/03/98 From: TOM TORFS Time: 12:21pm \/To: BOB STOUT (Read 2 times) Subj: SNIPPETS news Bob Stout wrote in a message to Jan Bijsterbosch: [SNIPVWIN] BS> TTBOMK, it should run on any version from Win 3.1 up. No, it is 32-bits only. Therefore it requires Windows 95 or NT. That's why the about screen says "SnipView for Windows NT/95" ;-) Unless someone else writes a 16-bit version, Windows 3.1 users will have to use the DOS version of SnipView. I simply don't have the tools nor the knowledge to port it to 16-bit Windows. greetings, Tom tomtorfs@village.uunet.be --- timEd/2 1.10+ * Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00005 Date: 01/06/98 From: CARLO MOSTI Time: 11:49pm \/To: TIM HUTZLER (Read 2 times) Subj: Re: asm CALL doesn't wor Salut/Hi Tim Hutzler! CM>Well, correct me if I'm wrong, but it seems you're calling a CM>label instead of a procedure the way it's written. TH> Sure. In assembly that's the way it would be done. Well if you're calling a subroutine, you dont jump to it like when you straight to a label, that's what I meant... Jumping to a label it's like a GOTO in Basic and calling a subroutine it's similar call to GOSUB in Basic, which is not the same... CM>If MyLabel was meant to be a procedure,... TH> In assembly parlace, it would be called a "subroutine"... So that means you understand what I meant! :) You're right about that, I normally speak in french, so I can miscall a term sometime, but I think procedure is not bad term cause when you right assembly you write like: Test Proc Near Mov ah,9 Mov bl,10 Test Endp "Proc", it means what it means, doesn't it! CM>what I suppose is the case since you're calling MyLabel instead of CM>jumping to it, then write it as a normal C procedure containing CM>the assembly lines like this: TH> Oh, don't make it too easy, Carlo. [grin] Sorry... :) See ya! Happy New Year 98! --- GEcho 1.11+ * Origin: -=[ POPA SBE // Ste-Therese // 430-0251 * 430-1524 ]=- (1:242/801) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00006 Date: 01/06/98 From: THOMAS HABETS Time: 11:06am \/To: DARIN MCBRIDE (Read 2 times) Subj: I need C++ TH>> That's because everyone who know C stay with it and skip the crappy C++ DM> ? If you don't like C++, why are you in the C++ echo? That's a good question. And the answer i that I've had it since before I saw how much I disliked C++. And now I keep it 'cause it's a good echo. (or maybe I'm just too lazy) --- * Origin: On a clear disk you can seek forever. (2:201/293.22) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00007 Date: 01/06/98 From: MART ORUAAS Time: 12:57pm \/To: CHRISTIAN FELDE (Read 2 times) Subj: strcmpi error? Hi Christian! 04 Jan 98, Christian Felde klbistab klaverit >> Mart Oruaas: CF> Is this strcasecmp() case sensitive? of course not. strcmp/strncmp are case-sensitive and strcasecmp/strncasecmp are case-insensitive functions(like strcmpi/strncmpi in borland libraries). 'man strcasecmp' should be useful. :) fazz --- GEcho 1.11+ * Origin: l'Ermite (FidoNet 2:490/18) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00008 Date: 01/07/98 From: KURT KUZBA Time: 04:23am \/To: RANDAL KOHUTEK (Read 2 times) Subj: Newbie =) RK> Is borland c++ 3.0 majorly outdated? I'm getting the RK> feeling it is. If so, does anyone have any suggestions on RK> the best *LOW COST* compiler deal out there? RK> I know GNU (g++) is around, but jeez ... BC++3.0 is not that outdated, really, and if you are going to be working in DOS, it's a good choice, actually. You can likely find a more recent Borland Turbo C++ for Windows for under $100 and Visual C++ 5.0 learning edition is available for $87. ( I just checked at http://www.computability.com/ ) If you are in school, you can get the pro version of VC++5.0 for around $100 with the student discount, and it may be worth your while to take a basic course in C or C++ at your local community college or technical school, both for the discount and for the structured course of study. I did. ( I try not to be too great an embarrassment to my school. :) Any recent release will otherwise be $300-$500, depending on who publishes it, if you want the full package, and DOS targeted apps will not likely be addressed. When I do something for DOS, I use BC++3.1, which was the last to have a DOS-mode IDE. Anything more recent will require that you run Windows to use the development environment. > ] Cold pizza is Nature's most perfect food.................... --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00009 Date: 01/07/98 From: KURT KUZBA Time: 04:23am \/To: TIM HUTZLER (Read 2 times) Subj: asm CALL doesn't wor TH> Ah, I see what you mean. I don't use block, but rather TH> simply use "asm" on each line. I can use conditional TH> jumps without any problem that wam but I can't use "call" TH> in any way, except via register, ie. TH> "CALL [BX]" for example. Try creating an entire block, but it will probably not work. The only way to allow a subroutine like that might likely be to place the subroutine code in another function and call that function. The best solution would be to put your asm module through the assembler and link it to your code. There are only certain applications for which inline asm is actually an appropriate choice. It is a bit limited. --- > ] Let he among you without sin cast the first... OW! HEY!!.... --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00010 Date: 01/07/98 From: KURT KUZBA Time: 04:23am \/To: VICTOR KEMP (Read 2 times) Subj: How do you read command l VK> Well the subject says it all. VK> "How do you read command line parameters?" The command line arguments are passed as an array of pointers to arrays of type char. #include int main(int argc, char *argv[]) { for(int argument = 0; argument < argc; argument++) puts(argv[argument]); return 0; } In this case, argc will be the number of arguments on the command line, which must always be at least one, since the command to execute the program is the first argument. The argument will be found as a string called argv[0], which is the first string pointer in the argv array of pointers. The example code will print out each argument entered on the command line. You can analyze them and do whatever you want, according to what they are, within your code. > ] Abandoning .. Perfect Truth .. I become .. My own Illusion.. --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750) --------------- FIDO MESSAGE AREA==> TOPIC: 203 C++ Ref: F1B00011 Date: 01/07/98 From: KURT KUZBA Time: 04:23am \/To: TIM HUTZLER (Read 2 times) Subj: DOS border/window librar TH> I want to build some DOS apps that use screen borders for TH> windows. Nothing fancy, just a function for boxes, list TH> boxes, pick boxes, etc. I just posted a bunch of stuff for a Borland Text Windows class a little while ago. I can post it again if you want it and missed it. It supports plain windows, bordered windows, shadows, and window titles. ( I did some more work on it. :) All you do is create the instance of the class and the shadows, borders, and background preservation is automatic. Restoration of the background is performed in the destructor, so that deleting the window removes it from the screen. > ] Let's try randomly accessing YOUR memory once............... --- * Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)