473,404 Members | 2,137 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,404 software developers and data experts.

error:Call of nonfunction in function main()

1
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<string.h>
void main()
{
int i=0;
float A=0,B=0;
float p2=0,p3=0,c2=0,c3=0,b=0,R2=0;
float w[10]={1e2,1e4,1e6,1e8,1e10,1e12,1e14,1e16,1e18,1e20};
float p2e[10];
printf("enter the value of p2,p3,c2,c3,b,R2");
scanf("%f %f %f %f %f %f %f" ,&p2,&p3,&c2,&c3,&b,&R2);
{
for (i=0;i<10;i++)
{
A=p2*R2((p3*((R2*p2)+(b*p3)))+(b*(c3/w[i])*(c3/w[i]))); (error:Call of nonfunction in function main() occur in this line)
B=(((R2*p2)+(b*p3))*((R2*p2)+(b*p3)))+((c3*(b/w[i]))*(c3*(b/w[i])));
p2e[i]=A/B;

}
for (i=0;i<10;i++)
printf("%f",p2e[i]);
printf("\n");
} }





plz help me to solve this error
Aug 29 '11 #1
1 4394
donbock
2,426 Expert 2GB
A=p2*R2((p3*((R2*p2)+(b*p3)))+(b*(c3/w[i])*(c3/w[i])));

The first instance of R2 is immediately followed by a parenthesized expression. The compiler assumes your desire is to call R2 and pass it the value of the expression. However, R2 is not a function so you get the error.
Aug 30 '11 #2

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

Similar topics

8
by: Rody Reulen | last post by:
I made an console application with Visual Basic .net. Visual Basic will automatically create the sub procedure main for you. I try to convert the main procedure to a function. During the...
1
by: joe10001 | last post by:
Hi all, I just installed CRELoaded (oscommerce fork) on my server and all work fine except that I have a little message at the bottom of the main page : Fatal error: main() : Security alert:...
7
by: Hexer | last post by:
Hi and good day to all...I am new to the C language and whenever I tried to run the program I made, it won't because it says it has an "expression syntax error in function main"..what I don't get is...
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,
4
by: huggsy | last post by:
I started using C just today and I am having a problem with strrev() function. Here are my codes: #include<stdio.h> #include<conio.h> #include<string.h> main()
3
by: ANURAGBAJPAI | last post by:
Please tell me what is the purpose of void in function main.
2
by: ehab mohamed | last post by:
When i try to run this program it give me a message that Lvalue required in function main. What is the cause?
0
by: pecca | last post by:
this is sample of my program #include<iostream.h> #include<conio.h> #define n 5 int total(int number); int average(int average, int total); void min_max(int number,int &min,int &max); void...
1
by: DavidSS | last post by:
Okay, I have a problem. I just started programming, and made my first "calculator" I then started making it more advanced, so it wouldn't crash if you tried to divide by 0. Then I wanted to make...
5
by: ehab mohamed | last post by:
#include<stdio.h> int main() { typedef struct { char name; int salary; }me; me a; a.name="ehab"; a.salary=5789;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.