• 0

Simple C++ question


Question

I'm trying to make a program to find the area of an object (no object inparticular its just and exercise in a book), but everytime I complie the program I recieve:

c:\projects\project1\variable.cpp: In function `int main()':

c:\projects\project1\variable.cpp:11: `::end1' undeclared (first use here)

c:\projects\project1\variable.cpp:12: confused by earlier errors,

I've tried to make this program twice and I keep getting the same errors. I'm using the Bloodshed Dev C++ complier. Never posted about a C++ problem before, so if there is any additional information you need about the problem I'll try to provide it.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

endl is probably the best way to move output to the next line, but remember, you can always use '\n'

cout << "I am the\nking";

output:
I am the
king

same as...

cout << "I am the " << endl << " king";

output:
I am the
king

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.