By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,912 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,912 IT Pros & Developers. It's quick & easy.

Accessing other functions at command prompt (stuck in the book AC++)

P: n/a
I understand the sections of code in the latter part Ch 4, and am
close to understanding the whole thing, but I'm stuck with an aspect
of having all these files and functions work together.

The program's purpose is to collect student grades from input, (int,
mid, final, and homework grades - a Struct is designed for he purpose)
All the grades are stored in a vector, the students are alpabetised,
and the overall grade is calculated for each student.

I have it all compiled, but when I run it, understandably, all I get
is a prompt.
I think I need to run the function Student_info first off, which will
read and process my data.

What do I type to run a function other than main at the command

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
When running an application from the command prompt only the main
function with be called directly. However, you can call other methods
that are defined from your main method. For example:

SquareRoot (
int pNumber)
return pNumber * pNumber;

int main ()
int x = 10;
int result = 0;

result = SquareRoot (x);

return 0;

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.