English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

*/my e-mail address is cherryseifu@yahoo.com or cherryseifu@hotmail.com*/

i have this assignment on the next day .the assignment is to write a program in C++,visual studio,
1.
that stores student data of number of students as structure(student ID, student name, age & CGPA)can insert, sort,delete any of the datas. it is better to put them as a dynamic pointer to delete.
2.and program that enables to add ,subtract or multiply two matrix
the operation are choosen by the user & the matrix data isgiven by the user.

2006-09-23 22:24:57 · 5 answers · asked by cherry 1 in Computers & Internet Programming & Design

5 answers

....anything??....Hmmmmm!

2006-09-23 22:36:16 · answer #1 · answered by LUCIFER 5 · 0 0

For the first one, a doubly linked list is probably the easiest thing to do. Just create a data structure with all of the data you need and pointers to prev and next members. Then as the user adds or deletes records, you can keep them in whatever sorted order you want just by modifying the prev and next pointers of the correct records. You can also dynamically sort the data on any field in the structure. There is a lot of material on the net about linked lists; but this should give you a starting point..
Hope this helps..

2006-09-24 05:37:04 · answer #2 · answered by Anonymous · 0 0

1. U have asked if to use linked list or not. I would say yes. but kkep in mind that you de-allocate the memory when it is done.Otherwise u will be in deep **** cos the pointers use a hell lot of resources. you might also use a deque(double ended queue) with pointer implementation for the same.

2.About the matrix addition use an array and make the life a lot simpler. Accept the values in a loop and read em the same way.

I hope i have made it a lot more simpler that it actually sounds right!!

thanks
Barry

2006-09-24 05:31:36 · answer #3 · answered by Barry 2 · 0 0

1: Whats wrong with just using the STL types, no need to be reinventing (and debugging) things like linked lists when you allready have a tried and tested implementation on the box.

2: Looks kind of trivial (if tedious to write), post your code and the error messages and someone will have a look.

Regards, Dan.

2006-09-24 18:15:15 · answer #4 · answered by Dan M 3 · 0 0

http://www.freeprogrammingresources.com/csharptutorials.html

2006-09-24 05:27:21 · answer #5 · answered by Anonymous · 0 0

fedest.com, questions and answers