0

I'm a newborn to programming and my instructor has thrown me to the wolves. I'm trying to compile this simple program but I get these syntax errors.
1>y:\d03423388\desktop\projct3\projct3\prjct3.cpp(16) : error C2059: syntax error : '<<'

What do I do with '<<' ?

4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by JohnKSmith
0

No idea whatsoever. You didn't post any code. Look at Line 16 of the file prjct3.cpp. You have a statement written incorrectly on that line.

Are you trying to do a left bitshift, inject data into an output stream, or something else that's completely off the wall?

Edited by Fbody: n/a

0

I'm a newborn to programming and my instructor has thrown me to the wolves. I'm trying to compile this simple program but I get these syntax errors.
1>y:\d03423388\desktop\projct3\projct3\prjct3.cpp(16) : error C2059: syntax error : '<<'

What do I do with '<<' ?

#include <iostream>
#include <conio.h>

using namespace std;

int main(void)
{


}

int cout; << "**********" << endl;
int cout; << "* *" << endl;
int cout; << "* *" << endl;
int cout; << "**********" << endl;
here's my code like I said I'm totally new.

0

That doesn't look right. The code should be in this format:

#include <iostream>
#include <conio.h>

using namespace std;
int main ()
{
cout << "**********" << endl;
cout << "* *" << endl;
cout << "* *" << endl;
cout << "**********" << endl;
return 0;
}

cout is not a variable so you can't say

int cout

.

0

In computer science a syntax error refers to an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language.
In standard C++, friend name injection is not performed. Friend functions that need to be found by ordinary name look up must first be declared in the class's namespace.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.