The program of the mini project MUST consists ALL of the following:
i. Function (that INCLUDES: value parameter & reference parameter)
ii. Selection (that INCLUDES: if, if-else, if-else if & switch-case)
iii. Repetition/Loop (that INCLUDES: while, for & do-while)
iv. Array (that INCLUDES: One-Dimensional with the use of loop & TwoDimensional with the use of nested loop)
v. Passing one-Dimensional Array to Function (that INCLUDES types of passing:
individual element & whole array)
vi. Passing two-Dimensional Array to Function (that INCLUDES types of passing:
individual element, whole array & one row)
vii. c-string Functions (that INCLUDES: strcpy/strncpy, strcmp, strcat/strncat)
viii. File (that INCLUDES: Input file & Output file)

Dani AI

Generated

A practical way to satisfy the assignment goals is to pick a small, concrete domain (for example: a gradebook or a shop inventory). Design a simple on-disk format (CSV or fixed-width) first; that makes parsing predictable and lets the program be developed and tested in clear phases. This approach also keeps the scope manageable while exposing the language features your instructor expects.

Break the work into small, testable pieces. Build a loader/saver that reads the file into an in-memory container, a set of record-level helpers (one that mutates a record, one that computes aggregates), and a thin CLI driver that exercises those helpers. Keep interfaces explicit: pass large containers by reference, return status via bool or error codes, and pass small values by value. An example of minimal prototypes:

struct Record { char name[32]; int id; double score; };

bool loadRecords(const char* filename, std::vector<Record>& out);
bool saveRecords(const char* filename, const std::vector<Record>& records);
void printSummary(const std::vector<Record>& records);
void updateRecordById(std::vector<Record>& records, int id);

If legacy C-style strings are required, use bounded copies and always ensure null-termination; otherwise prefer std::string for safety. Use standard file streams for input/output and parse lines with std::getline + std::stringstream for robustness. Standard C++ code of this style builds with MSVC and other compilers. For reference material see the C++ reference on references and standard streams: and basic_fstream.

Recommended Answers

All 2 Replies

This is just a homework assignment. How can we help you with it? What do you have so far? Is there somewhere that you’re stuck? Please show your work and we will try to help.

Is your post related with Microsoft?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.