Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


C++ end1 error


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Gamer1443   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 May 2002 - 04:02 AM

When i type in the code in c++ then compile my work an error comes saying: C:\My Documents\Cpp2.cpp(6) : error C2065: ''end1'' : undeclared identifier what causes that and how should i fix it Thunderstorm Games

Sponsor:

#2 Michalson   Members   -  Reputation: 1657

Like
Likes
Like

Posted 19 May 2002 - 04:08 AM

Post some source code. You''ve either misspelled a variable/function reference as ''end1'', or you''ve forgotton to declare it. ->For Beginners

#3 Arild Fines   Members   -  Reputation: 968

Like
Likes
Like

Posted 19 May 2002 - 04:19 AM

Wild guess - shouldnt it be endl instead of end1? The letter l instead of the number one?



#4 Gamer1443   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 May 2002 - 04:30 AM

This is the code im trying to put in:

#include <iostream>
using namespace std;

int main( void )
{
cout << " /\\ " << end1;
cout << " / \\ " << end1;
cout << " / \\ " << end1;
cout << " | | " << end1;
cout << " |[] [] |" << end1;
cout << " | |" << end1;
cout << " ----- " << end1;

return 0;
}

Thunderstorm Games

#5 insiej   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 May 2002 - 04:32 AM

end1 has to be endl;

I will spell it out, to make sure.

E - N - D - L - ;

#6 powdahound   Members   -  Reputation: 158

Like
Likes
Like

Posted 19 May 2002 - 05:29 AM

Haha, yes, endl. (as in end line)

cout << "My text" << endl;
or even
cout << "My text\n";

/n is the newline character.


---
"May you live all the days of your life."

#7 Neophyte   Members   -  Reputation: 590

Like
Likes
Like

Posted 20 May 2002 - 02:51 AM

\n is not the same as endl in c++. endl flushes the buffer, but \n doesn''t (altough it does in plain c).

-Neophyte

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED d- s:+ a- C++$ UL++ P++ L++ E W+ N+ o K? w !O M--(+) V-- PS+
PE Y+ PGP t-- 5++ X+ R(+) rv+(++) b+++ DI+ D(+) G e+>++ h r--> y+
----- END GEEK CODE BLOCK-----
geekcode.com




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS