Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Hey90

I have been told it is good to overload the stream extraction operator to load data from a file. Would I simple use this in my class: friend ifstream &operator>>( ifstream &input, Class &C ) { input >> C.variable1 >> C.variable2 >> C.variable3; return input; } What are the advantages …

Member Avatar for deceptikon
0
432
Member Avatar for Hey90

I would like to convert a procedural database program that I have created to an object oriented program. In my procedural program I use a struct: struct shoes{ char Name[20]; int Number; double ShoeSize; }; Putting this into a class would I simply use: class Shoes{ public: //Function declerations private: …

Member Avatar for Hey90
0
612
Member Avatar for Hey90

I have created a basic object oriented database of a list of shoes containing the shoe name, number and shoe size. I am trying to sort the list of shoes alphabetially by name and by shoe size. I have the following code: Shoes.h: #include <iostream> #include <fstream> #include <string> #ifndef …

Member Avatar for Hey90
0
4K
Member Avatar for Hey90

How would I pass an element in a struct array. I have to call the function: new(Shoe[num], num); where num is the number of elements in the database. I have declared the function as: void new(Shoes Shoe[], num); but I get the error: cannot convert 'Shoes' to '*Shoes' for argument …

Member Avatar for Hey90
0
183
Member Avatar for Hey90

**What I would like to do:** - Read data from text file - Display data from text file - Add new data to text file - Save new data to text file **The file format used is as follows:** Number of items in text file (3) Name 1 Number 1 …

Member Avatar for Hey90
0
245
Member Avatar for Hey90

I have to create a database with the data stored in a .txt file. Each record is for a company with the following fields: Name, Place, East(km), North(km). Each record from the file needs to be read into a struct array. I have managed to read the records into a …

Member Avatar for Adak
0
245
Member Avatar for Hey90

I have to create a database with the data stored in a .txt file. Each record is for a company with the following fields: Name, Place, East(km), North(km). Each record from the file needs to be read into a struct array. I have managed to read the records into a …

Member Avatar for Adak
0
791