Can't End Line

I get the following error in my program on lines 26-28:
warning C4551: function call missing argument list

Any help would be appreciated
Thank you.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <cmath>
#include <math.h>
using namespace std;

int main() {
float F,O,I,L,A,B,C,D,E,G,J,H,K;
    cout<<"F=";
	cin>>F;
	cout<<"O=";
	cin>>O;
	cout<<"I=";
	cin>>I;
	cout<<"L=";
	cin>>L;
	    A=F*I;
		B=F*L;
		C=O*I;
		D=O*L;
		E=B+C;	
		G=-1*(O/F);
	    J=-1*(L/I);
	    H=((J+G)/2);
		K=((F*H)+O)*((I*H)+L);
	system("CLS");
	cout<< A," X²+ ",E," X+ ",D;endl;
	cout<<"X-Intercepts= ",J,",0";endl;
	cout<<"X-Intercepts= ",G,",0";endl;
	cout<<"Vertex=",H,",",K;
	system("pause");
	return 0;
}
What are you trying to do on lines 26-29? You seem to have random , and ; thrown in there for some reason.
Oh those are for display. The commas are used for coordinates such as x,y and x intercepts. I put all the necessary ";" and if i take them out if says I'm missing them. If you run the program, it displays line 26-29 on the same line. I'd like them all on different line. Hope this helps.
1
2
cout<< ...;endl;


replace that with
cout << ... << endl;

endl is not a function.
Last edited on
closed account (EwCjE3v7)
Yea what are u trying to do maybe u want this. Your code is to confusing. Tell us what this (,) and this (;) do?
1
2
3
4
	cout << A << " X²+ " << E << " X+ ,0" << endl;
	cout <<"X-Intercepts= " <<  J << ",0" << endl;
	cout <<"X-Intercepts= " << G << ",0" << ;endl;
	cout<<"Vertex= " << H << "," << K << endl;


I will update once on pc. I'm on ipad now so I can't help much


The commas are used for coordinates such as x,y and x intercepts


Well u need to put the commas in a string literal like this "in here" and remove the semicolon before endl and put << between values and strings
Last edited on
If you want to cout something,you can't do it by using , (if you are trying to output more than 1 number or etc) , you must write <<

Basically everything is okay,but instead of , write <<
And endl is used with cout ,so you must write cout << endl; ,in this case just << endl ,instead of ;endl


#include <iostream>
#include <cmath>
#include <windows.h>
using namespace std;

int main() {
float F,O,I,L,A,B,C,D,E,G,J,H,K;
cout<<"F=";
cin>>F;
cout<<"O=";
cin>>O;
cout<<"I=";
cin>>I;
cout<<"L=";
cin>>L;
A=F*I;
B=F*L;
C=O*I;
D=O*L;
E=B+C;
G=-1*(O/F);
J=-1*(L/I);
H=((J+G)/2);
K=((F*H)+O)*((I*H)+L);
system("CLS");
cout<< A <<" X²+ " << E << " X+ " << D << endl;
cout<<"X-Intercepts= " << J << ",0" << endl;
cout<<"X-Intercepts= " << G << ",0" << endl;
cout<<"Vertex=",H,",",K;
system("pause");
return 0;
}



Last edited on
Thank you all. Sorry if it looks like a stupid mistake, i'm very new to this. It works great now. Appreciate all of your help :)
Topic archived. No new replies allowed.