I've been studying C for sometime now and Ive started with the standard library's of course, but anyway im trying to make sure to keep my code organized and neat. Main question is I know when making computations for big projects its important to use functions so we can have easy access if you need to update it, but its not necessary in a small project right? Im trying to organize my code 100% so any comments are great! Thanks.
// Client.cpp : Defines the entry point for the console application.
std::cout<<"What is your name?\n";
std::cout<<"Your name is: "<<client.name<<"\n";
std::cout<<"How many records will we be computing today?"<<std::endl;
for (int i = 1; i <= records.number; ++i) // function maybe? we may want to call this a 100 more times in the future so we want easy access to it.
records.value += records.localnumber; // lol I hope my logic is good here lawl. :|
std::cout<<"Client records processed: "<<records.value<<"\n";
struct ClientStats_t // data structure
int number; //data members
} client, records; // data object
//ClientStats_t client; //a second header was causeing a conflict make sure you only include the struct once. or you will confuse the compiler.
// TODO: reference additional headers your program requires here