l09_6up

# l09_6up - Matrix operations CSci 1113 C/C for Scientists...

This preview shows pages 1–3. Sign up to view the full content.

: CSci 1113 C/C++ for Scientists and Engineers Section 010 - evening class Arrays Prof. Eric Van Wyk and Ted Kaminski Spring 2010 c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 1 / 20 Matrix operations : Matrix multiplication I Let’s write a matrix multiplication function I Until we introduce pointers, we’ll be working with partially ﬁlled arrays. c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 2 / 20 Matrix operations : Exercise 9.1 What should the function declaration for matrix multiply look like? c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 2 / 20 Matrix operations : Examples I RadioCost.cpp I GraphReachability.cpp c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 3 / 20 Grouping data: struct : Syntax struct name { variable declarations } ; c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 4 / 20 Grouping data: struct : Date example: declaration struct Date { int year; int month; int day; } ; I Using a class like a struct is a bad idea. I Classes are about operations! c ± Van Wyk and Kaminski CSci 1113: C/C++ for Scientists and Engineers, evening class Spring 2010 Page 5 / 20

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Grouping data: struct : Date example: use Date now;
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

l09_6up - Matrix operations CSci 1113 C/C for Scientists...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online