473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to solve call of nonfunction in function main[]

this is sample of my program
Expand|Select|Wrap|Line Numbers
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #define n 5
  4.  
  5. int total(int number);
  6. int average(int average, int total);
  7. void min_max(int number[5],int &min,int &max);
  8.  
  9. void main(){
  10. int i;
  11. int number[5],total,average,max,min;
  12.  
  13. cout<<"enter 5 number= \n";
  14. for(i=0;i<5;i++)
  15. cin>>number[i];
  16.  
  17. total(number);
  18. average(total,average);
  19. min_max(number,max,min);
  20.  
  21. getche();
  22. }
  23.  
  24.  
  25. int total(int number[5]){
  26. int i,tot;
  27. return tot=tot+number[i];
  28. }
  29.  
  30. int average(int tot, int average){
  31. int ave;
  32. return ave=tot/5;
  33. }
  34.  
  35. void min_max(int number[5],int &A,int &B){
  36. int i;
  37.  
  38. for(i=0;i<5;i++){
  39.  
  40. if(number[5]>A)
  41. A=number[5];
  42.  
  43. else
  44. B=number[5];
  45. }
  46. cout<<"max="<<A;
  47. cout<<"min="<<B;
  48.  
  49. }
my question is how to solve call of nonfunction in function main[]...i do not understand what it means...
Oct 17 '10 #1
0 1306

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Rajan | last post by:
Hi All C++ experts My problem is regarding calling templatise class function please see the code snip shot #include<iostream> using namespace std void fun(char*);
1
by: Sandeep Chikkerur | last post by:
Hi, How do I call a function from one project to a function in another project? e.g. In VC++ environment, if u've two different projects , say proj1 & proj2 /****************************...
7
by: Steven | last post by:
I'm novice in C#. Here is a basic question -- I have 4 variables a, b, c, d in class main(). I want to perform all the mathematical operations on these variables in a function called maths() and...
6
by: grist2mill | last post by:
I want to create a standard tool bar that appears on all pages that is a control. The toolbar has a button 'New'. What I wolud like when the user clicks on 'New' depends on the page they are on. I...
1
by: ckb | last post by:
Hi, I have an html page that has a javascript function that populates a dropdown list on the main html page. Ihave written a function that opens up a new window on a button click on the main window...
28
by: ravi | last post by:
Hello everybody, I am writing a small application which does some work before the user main function starts execution. I am trying to #define the main function. But the problem is that,
11
by: dolphin | last post by:
Hi All! I have a question that how to call a function just using a string. For example There is a .cpp file named a.cpp.There are some functions::fun1() fun2() fun3(). I have another fucntion...
12
by: aaragon | last post by:
I have this scenario: several arrays for which I have their fixed values at compilation time. Now, at runtime I need to access a specific array depending on an integer but I want to avoid if and...
1
by: DavidSS | last post by:
I just started programming, and I followed a tutorial to make a calculator. Once I was done, I wanted to make it more advanced, so it wouldn't crash if I try to divide by 0, but instead not giving me...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.