I appreciate everyone having taken the time... it's baffling me still.
(NOT Too mention FRUSTRATING me still! LOL.)
If you "run" the program, and that DAT (test file) doesn't work for you......
Type: Posts; User: JKI
I appreciate everyone having taken the time... it's baffling me still.
(NOT Too mention FRUSTRATING me still! LOL.)
If you "run" the program, and that DAT (test file) doesn't work for you......
I already implemented what you have suggested. (Each function shows--outputs--what was passed to it, and the arrays are displayed after being sorted.)
The information contained in them are 100%...
No, it is not until EOF. The indexing array is sorted, searched, and then I print all records (>=) the specified target, if found. (using seekg and the record # * record size--it's a "fixed length"...
Sorry... it wouldn't let me upload a DAT file.
Here it is, renamed TXT.
(It needs to be named "inventory.dat" for the program to run.)
I hope this works... Windows was not happy renaming...
Okay... I warn you, the code is verbose and not pretty. LOL.
Also, the test file must be present (inventory.dat).
You can search by Inventory Number: 000, 111, 222, etc.
Or, by Inventory...
I have a situation, I'm hoping someone has seen before...
My program runs fine. (That's a first!--LOL)
The program is essentially a class to handle an inventory file. It has a menu with four...
Okay. Was worth a shot.
Easy enough to work around.
Thanks:: Jazz
Quick (and probably stupid) question:
My program retrieves records from a binary file.
I want the ouput of my records search to stop when the screen is full (or, say 20 records worth of data);...
I appreciate all the replies.
I was hoping to avoid it, but I guess the safest bet at this point would be to slave the old drive. I must have blipped something during the uninstalls.
Thanks...
Decided to blow the dust off an old computer I have and hook it into my home network.
It currently has Windows 98 on it. (problem #1--LOL)
Anyhow, I got it talking to the network, updated...
Right... poor choice of words on my part. Should've said the compiler.
strcmp() did the trick.
(Of course after I compiled and ran it... I found some "other stuff" Linux wasn't too happy with; but that was all my doing... LOL. It never ends! )
Thanks:: Jazz
Meaning under Linux?
I'll give it a shot. Just struck me as odd that the program worked fine on my machine and then Linux stuck it's tongue out at me. The main differences I've encountered so...
(Sigh....)
I finished a program which runs fine on my XP box (Dev C++), but when I compile it under Linux (G++), I get:
In constructor 'Inventory::Inventory()'
ISO C++ forbids assignment of...
Benny,
You were entirely correct.
Changed it to:
if (strcmp(keyptr[j].invnbr, keyptr[j + 1].invnbr) > 0)
Thanks! Hope you're right, it was making me nuts wondering why one structure couldn't hold the other.
I'll give it shot and let you know if I got it.
Thanks again, sometimes another set of...
I have an array of structures which I am attempting to bubble sort.
My problem is I cannot get a "temp" struct to hold one of the structures within the array for the sort.
My data is valid...
Appreciate the quick reply!
I actually tried both. (Using dynamic arrays within the class, and getline to "parse" in the function call; and isdigit() for the error checking.)
My syntax is...
Having a couple fairly simple problems (but I'm lost nonetheless):
I have a class consisting of something like this:
class myclass
char a[60];
char b[60];
int c;
...