home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!neoucom.edu!aldhfn!Dean_Wagner
- From: Dean_Wagner@aldhfn.akron.oh.us (Dean_Wagner)
- Subject: More help (mostly os2/dos specific)
- Newsgroups: comp.lang.c
- Summary:
- Keywords:
- X-Newsreader: TIN [version 1.1 PL8]
- Message-ID: <Dean_Wagner.49sy@aldhfn.akron.oh.us>
- Date: 20 Jan 93 21:56:55 EST
- Organization: Auldhaefen Associates
- Lines: 55
-
- Thanks to all who responded to my question about text entry. I was looking
- for a way to have the cursor not enable a person to enter more than
- MAX_LENGTH characters. My actual problem was lack of a null ending my
- string.
-
- Here's some more things I could use some help with:
-
- 1) do Microsoft C DOS graph functions work with os2? I was trying to
- use clearscreen, but got an unresolved external from inside the library
- function. I don't have the exact error here, but it said something like
- (..\gr\something.asm: ___somevar). Does this mean the graphics library
- uses something defined in the asm file (which obviously isn't there)? I
- reinstalled the compiler, but got no option to load that file, or anything
- in a gr directory.
-
- 2) This was a problem I had at work, and it was solved, but the
- solution required changing the question - I was curious about the solution
- to the question as it originally was:
- Given a 2-dimensional array, how is it possible to dynamically
- allocate memory for the first dimension? In other words, I wanted to
- changed the declaration from
- record[56][5] to
- *record[5] or record[][5]
-
- I tried several ways to allocate memory for this definition, but couldn't
- figure out what I was doing wrong. Here were the suggestions from co-
- workers...
- Change the second dimension to a structure (works, but I didn't
- want to rewrite the program, just make it more versatile)
-
- record = malloc(sizeof(int)*5*number) - it wouldn't let me, saying
- that record must be an lvalue.
-
- allocate 4k, since that's the smallest size possible with os2
- anyways.
-
- The final solution, which was "why bother? the largest number possible is
- 64", made me beat myself over the head many, many times. Anyways, I'm
- still wondering how I would have allocated the memory, given the
- declarations mentioned above.
-
- 3) Can anyone suggest a good manual for programming software to be
- used ona BBS? That's what I'm doing now, and it's something I never did in
- school or elsewhere.
-
- 4) Is there any representation for the delete key in printf? Right
- now, I use "\b \b", which backspaces, spaces, and backspaces again. It's
- functional, but certainly not efficient.
-
- Thanks in advance,
-
- --
- Dean Wagner Nothing matters but the weekend
- Dean_Wagner@aldhfn.akron.oh.us From a Tuesday point of view
- bx451@cleveland.freenet.edu -Switch into Glide, The Kings
-