473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Struct Help...

video.h

Expand|Select|Wrap|Line Numbers
  1. const int SIZE = 10;
  2. struct customerRec {
  3.  
  4.   char customerName[20];
  5.   long customerNum;
  6. };
  7. struct videoRec {
  8.   long videoNum;
  9.   char videoName[30];
  10.   int borrowed;
  11.   customerRec customer;
  12. };
  13. videoRec videoLib[SIZE]= { {123456, "Alexander",1, {"Joe Bloggs",23215}},
  14. {24687, "Terminator 2", 1, {"Fred Nurks", 23456}},
  15. {54321, "Titanic", 0,{"", 0}}};
main.cpp

Expand|Select|Wrap|Line Numbers
  1. cout << "  What is the Video Number?: ";
  2. cin >> videoNum;
  3. cout << endl <<"  What is the Video Name?: ";
  4. cin >> videoName;
  5. videoLib.videoNum = videoNum;
  6. videoLib.videoName = videoName;
  7. displayMenu()
  8.  
How do i add new videoNum and videoName values to the end of that videoRec videoLib array ... in the video.h, isnt not like what im trying to do in the main.cpp is it?
Aug 29 '05 #1
0 1365

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Angelo Secchi | last post by:
I'm trying to use the unpack method in the struct module to parse a binary file without success. I have a binary file with records that include many fields for a total length of 1970. Few days ago...
5
by: Roy Hills | last post by:
When I'm reading from or writing to a network socket, I want to use a struct to represent the structured data, but must use an unsigned char buffer for the call to sendto() or recvfrom(). I have...
4
by: Angus Comber | last post by:
Hello I have received a lot of help on my little project here. Many thanks. I have a struct with a string and a long member. I have worked out how to qsort the struct on both members. I can...
20
by: fix | last post by:
Hi all, I feel unclear about what my code is doing, although it works but I am not sure if there is any possible bug, please help me to verify it. This is a trie node (just similar to tree nodes)...
4
by: PCHOME | last post by:
Hi! I have questions about qsort( ). Is anyone be willing to help? I use the following struct: struct Struct_A{ double value; ... } *AA, **pAA;
2
by: Arne Styve | last post by:
Hi, I have an API written in C that came with some graphics cards we are going to use in a project. I need to write a small application where this API is to be used, and I decided to try out...
28
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
4
by: JR | last post by:
I need some help. I am trying to return a dirent struct location so i can access what the function found in main(). I dont understand pointers very well and think that is were i am getting it...
9
by: sean.scanlon | last post by:
can someone help understand how i can could access a struct field dymanically like: foo->fields ? when i try to compile this i get the following error: 'struct pwd' has no member named 'fields'...
4
by: jadeivel756 | last post by:
I BADLY NEED YOUR HELP...... HELP... hOW TO Pass value to a struct type and permanently store the data after youve given the data.The programming language is C. My problem is that as I exit the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.